Im building a serverless backend using the following AWS technologies:
- AWS api_gateway
- AWS cognito
- AWS lambda
In api_gateway I have created a Cognito User Pool authorizer and Im using this authorizer for all requests to the backend.
Everything works: When a user makes a request with an invalid JWT token, the server respons accordingly. A valid JWT token executes the requested Lambda function.
Problem: I'm unable to retrieve identity
information, such as accessKey
, accountId
, cognitoIdentityId
and so forth. All these variables are null
when I access them via the context
object in the lambda function
Question: What do I need to do in order to get the identity
variables?