2 Answers
- Newest
- Most votes
- Most comments
0
If you are using proxy integration then you can access the context data from the event payload requestContext block received in the integration. Suppose here the integration is a lambda proxy then from this lambda you can initiate another API request using the context data in the header form. If you have a HTTP integration then inside the Integration Request, you can map the http header x-api-key with value $context.authorizer.apiKey . This will invoke the backend integration using the required header.
-1
A Lambda Authorizer (custom authorizer) can only returns an IAM policy as an output. Lambda Authorizer cannot be used for your scenario. https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html
answered a year ago
Relevant content
- Accepted Answerasked 2 years ago
- asked 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago