Get context.authorizer in Template Mapping

0

Hi there.

I have one Cognito pool and API gateway. They are integrated and working perfectly. I can't get this information from the authorizer. $context.authorizer My main objective is to get the username authenticated. I printed the whole information from context, and every time the context.authorizer was blank.

Example:

{
  "output": "{resourceId=vgw558, authorizer=, resourcePath=/prospect, httpMethod=POST, extendedRequestId=bc3XXXXXAFPdIAMF_xg=, requestTime=11/Nov/2022:19:18:17 +0000, path=/v1/prospect, accountId=62610####7, protocol=HTTP/1.1, requestOverride=, stage=v1, domainPrefix=api-test-dev, requestTimeEpoch=1668194297490, requestId=9ddb6faf-d2e1-####-a205-1c51ef034e64, identity=, domainName=api.mydomain.net, responseOverride=, apiId=2pcvwqifca}"
} 
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions