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 questions
Can I fully authenticate to AWS iOT through API Gateway HTTP using only header authentication methods?
asked 6 months agoHandel custom header in AWS API Gateway ?
Accepted Answerasked 2 months agoHow to pass API Gateway authorizer context value as an HTTP header
asked a month agoReturn a custom header from lambda authorizer in API-gateway (HTTP api)
asked 2 months agoPassing HTTP Headers from API Gateway HTTP API to Step Function?
asked 4 months agoCan I use API Gateway cache invalidation with a custom authorizer ?
asked 7 months agoWhy aren't the HTTP headers passed from API Gateway to Step Functions?
asked 8 months agoIs it possible to throw custom error message from API Gateway Lambda Authorizer
asked 4 months agoattach lambda authorizer to http API
asked 5 months agoLambda Authorizer with API Key enabled on API Gateway
asked 5 months ago
Thanks a lot for the reply Iwasa.
Do u have the source code for the same?