I'm trying to understand what are the available claims I am able to access from the API Gateway when an user makes an authenticated request.
The API Gateway Mapping Template Reference (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference) is listing different authorizer claims but it looks like only "sub" and "email" work.
All the other claims are logged as "-"
I'm logging the requests with CloudWatch, as described in this guide: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html
I would like to get the username too but none of the following mapping work:
- $context.authorizer.claims['cognito:username']
- $context.authorizer.claims\['cognito:username'\]
- $context.identity.cognitoIdentityId