Skip to content

Why is authentication working locally but not when deployed to lambda in a container? #1933

Answered by Mike-Gilge
Mike-Gilge asked this question in Q&A
Discussion options

You must be logged in to vote

So anyone else who runs into this issue... I am using an API Gateway authorizer to lock down the API Gateway to only accept requests from cloud front (because im using an HttpApi and wanted a WAF as well). Turns out when you do that the APIGatewayHttpApiV2ProxyFunction class overwrites existing authorization. I was able to fix this by overriding the FunctionHandlerAsync and setting the authorizer to null on the incoming request.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Mike-Gilge
Comment options

Answer selected by Mike-Gilge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant