Auth0 Home Blog Docs

How to retrieve user id when using AWS Cognito and Api Gateway?

auth0
integrations
aws
cognito
lambda

#1

We've been following the AWS Cognito Tutorial and authentication is working fine. We're able to invoke a Lambda function via the API Gateway after authentication. However, we now want to retrieve the user id / email (or alternatively the JWT token) in Lambda. How would we go about this?

I also read the Api Gateway integration documentation. However, if I understand correctly, this is an alternative to Cognito to retrieve the API Key, right? We don't want to replace Cognito...


#2