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}"
} 
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen