How to get the Cognito Identity id in AWS Lambda

Renan picture Renan · Apr 28, 2015 · Viewed 20.5k times · Source

How can I get the identity id of the user (logged in by AWS Cognito) that invoked an AWS Lambda function? Do I have to use the SDK on the Lambda function to get the identity id?

Answer

user966391 picture user966391 · Sep 15, 2015

In AWS javascript SDK inside lambda function just use context.identity.cognitoIdentityId It is working for me