- 新しい順
- 投票が多い順
- コメントが多い順
Assuming that this is a REST API and a REQUEST type Lambda, the default cache key used for Lambda authorizers is the resource path.
On REQUEST type Lambda authorizers, you have the ability to define “identity sources” which are used to create the cache key.
When multiple identity sources are defined they are used in combination to create the cache key.
You can define the identity sources in the Lambda Event Payload (you can find this in the Edit Authorizer settings) in order to create a cache key based on the resource path as well as the value of the x-api-key header.
To verify whether or not it's cached, output a message to the log (eg console.log("in authorizer")) inside your authorizer lambda function and then you'll know if it's being called or cached after you see how many times the message is in the authorizer log in CloudWatch.
関連するコンテンツ
- AWS公式更新しました 2年前