Using AWS Lambda with Cognito and API Gateway
问题 How to get user in Lambda function? User is authenticated in Cognito and invokes lambda with API Gateway. API Gateway method has AWS_IAM authorizer and checked "Use Lambda Proxy integration" checkbox 回答1: If you have checked AWS_IAM API Gateway, identity of the end user available to your function. You can access the Identity ID as follows. exports.handler = function(event, context) { var identity = event.requestContext.identity.cognitoIdentityId; console.log("clientID = " + identity); context