- Newest
- Most votes
- Most comments
If it were me, I'd use option 2 because it's pretty simple and it just works.
Why do you think there is operational overhead? (Yes, I'm aware I'm disagreeing with the authors of the blog post.)
Why does the secret need to be periodically rotated? If it's only known to CloudFront and APi Gateway; if it's long and random why does it need to be changed? This is a question only you and your security/risk management team can answer but (again, if it were me) I see this as a very small risk. Given that traffic from CloudFront to APi Gateway is encrypted the only realistic way it can be discovered is by someone looking at the configuration or the source code.
If it was a concern, I'd have some sort of automation to rotate the secret - noting that you'd need to do it at the exactly same time; or have the Lambda authorizer keep track of the previous key for a specified period of time. Once the code is written and running, the operational overhead is zero (or very close to it).
Relevant content
asked 4 years ago
- AWS OFFICIALUpdated a year ago

Thank you for your answer. Can you confirm approach 3 does not support my use case to do both secret & OAuth token validation?