HTTP API Lambda Authorizer returns "Internal Server Error" when integrated with stage variables

0

I created a Lambda Authorizer on API Gateway(HTTP API) and used a stage variable for integrating the lambda because I need a different lambda for different stages. I attached it on one of the routes but I get "Internal Server Error". Even when I add permission to invoke the lambdas. When I look into the access logs, the context.authorizer.error's value is "The Lambda authorizer returned a 4xx error. Check the Lambda function and try again."

Also, I created the same authorizer (used stage variable and added permission too) on API Gateway(REST API) and it's working.

  • To add more information to the question above. The stage variable works for HTTP API in integrations with other Lambda functions but not for the Lambda function as an authoriser. Are we not supposed to use Lambda authoriser with stage variable?

anne
asked 3 months ago96 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions