title: AWS Cognito adminCreateUser from java script SDK
body: <p>I'm trying to create a user in a AWS User Pool from an AWS Lambda</p>
  
  <p>I tried with this script took from what seems to be the official JavascriptSDK for the AWS but can't get it working. <a href="http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#adminCreateUser-property" rel="noreferrer">http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#adminCreateUser-property</a></p>
  
  <p>I keep getting this error:ypeError: cognitoidentityserviceprovider.adminCreateUser is not a function</p>
  
  <pre><code>var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider({apiVersion: '2016-04-18'});
  
  var params = {
      UserPoolId: 'eu-west-1_XXXXXXXX', /* required */
      Username: 'me@example.com', /* required */
      DesiredDeliveryMediums: [
          'EMAIL'
      ],
      ForceAliasCreation: false,
      MessageAction: 'SUPPRESS',
      TemporaryPassword: 'tempPassword1',
      UserAttributes: [
          {
              Name: 'email', /* required */
              Value: 'me@example.com'
          },
          {
              Name: 'name', /* required */
              Value: 'Me'
          },
          {
              Name: 'last_name', /* required */
              Value: 'lastme'
          }
          /* more items */
      ]
  };
  cognitoidentityserviceprovider.adminCreateUser(params, function(err, data) {
      if (err) console.log(err, err.stack); // an error occurred
      else     console.log(data);           // successful response
      callback(null, data);
  });
  </code></pre>