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?


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

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

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