- Newest
- Most votes
- Most comments
I am assuming you need to add the custom headers before you send the request to your backend. API Gateway lets you use mapping templates for this - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html
There is an example provided in this Support Knowledge Center article that gets into the weeds - https://aws.amazon.com/premiumsupport/knowledge-center/custom-headers-api-gateway-lambda/#:~:text=To%20pass%20custom%20headers%20from,from%20the%20original%20API%20request.
Hi, @Nirmal Kumar
I hosted the Minimal API with API Gateway + Lambda and experimented with passing the Lambda authorizer context value as a custom header for my request.
As a method, you need to disable Lambda proxy integration, customize the mapping template, and map the AuthorizerContext to the request header.
Please take a look at the detailed verification contents and methods summarized in the article. (I'm sorry in Japanese)
https://dev.classmethod.jp/articles/lambda-authorizer-context-minimalapi-custom-header/
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
Thanks a lot for the reply Iwasa.
Do u have the source code for the same?