How do you use AWS User Pool functions in a Node.js Lambda?

I am trying to sign up a user using User Pools and have used and adapted the code from the example here in my lambda.

I reference AWS in the normal manner:

var AWS = require('aws-sdk'); 

and attempt to reference an existing user pool:

AWS.config.region = 'eu-east-1';  var poolData = {      UserPoolId : 'eu-west-1_xxxxxxx',     ClientId : 'xxxxxxx' };  var userPool = newAWS.CognitoIdentityServiceProvider.CognitoUserPool(poolData); 

but I get the following error:

TypeError: AWS.CognitoIdentityServiceProvider.CognitoUserPool is not a function

Am I using the wrong SDK? the setup page explains how aws-cognito-sdk.min.js is variant of the full SDK but references just the Cognito Identity Service, so I assume that the full SDK will also allow me to access it... Any ideas?

Replay

Category: node.js Time: 2016-07-31 Views: 4

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.301 (s). 12 q(s)