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}"
} 
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ