2 Answers
- Newest
- Most votes
- Most comments
0
Hello.
If it is cross-account, you can use Lambda with the settings in the document below.
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-cross-account-lambda-integrations.html
However, we have confirmed that it does not work well in the case of cross regions.
I will check it a bit more.
0
Hi,
Like Riku, I believe that API GTW and Lambda must be in same region (but not necessarily in same account).
So, you can create a proxy Lambda that will get the input payload from Account A in Region 1 to call Lambda in region 2. You can go with a direct Lamdda invoke() from the proxy Lambda to call the real one.
Best,
Didier
Relevant content
- asked a year ago
- asked 5 months ago
- asked 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
We were able to confirm that it can be used cross-account if Lambda is in the same region as API Gateway. Although the cause is unknown in the case of a different region, we have confirmed that the following permission error occurs even if a resource-based policy is attached to Lambda.
Hi Riku and Didier, I get a different error while testing the API gateway integration after attaching the necessary resource-based policy to the lambda: Latency 119 Status 500 Response body {"message": "Internal server error"} Response headers { "x-amzn-ErrorType": "InternalServerErrorException" }