1
votes

After User is confirmed (verified) in the end of the SignUp stage in Mobile App, how i can push his AccesToken to Lambda function which will be necessary for my lambda method (in Python 2.7) below,

def lambda_handler(event, context):
  response = client.get_user(
       AccessToken='string')

"get_user" Method which i want to use in AWS Lambda

My lambda function is already attached to Cognito-Post Confirmation Trigger. This AccessToken only need after Confirmed Sign-Up to get the Username of the newly added User, not necessary in every "Log in" of User into the App. I ll be glad if you can let me know how to push AccessToken of User to Lambda function in post-confirmation trigger.

My Cognito Post Confirmation Trigger Setting

1

1 Answers

2
votes

If i understand you correctly, you want to get user information in the post confirmation trigger. In that case, you can do the following: http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html#aws-lambda-triggers-post-confirmation-example

event['userName'] should give you the username.