How to allow a Lambda that is inside a private VPC to make a GET request to a Regional API in API Gateway

0

I have a lambda that needs to be inside a private subnet in the VPC so that it can connect to a Neptune database, but by doing it I can't make a GET request from a Regional API from my API gateway, from the research I made it seems like I need to set a NAT Gateway to connect to a public subnet in order to be able to make the GET request that I need to do.

I'm asking this question to make sure that what I need to do is set up a NAT Gateway, and if so what would be the best way to do that, is this a good guide on how to do it?

If setting up a NAT Gateway isn't the best way to resolve my issues, what would be?

Thanks in advance

3回答
1
承認された回答

If you want to grant internet access to your AWS Lambda function in a VPC (private subnet), set up a NAT gateway. Here is a great step-by-step guide.

AWS
Max
回答済み 8ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前
1

HI, tomsantos. To avoid problems with missing something important please use official documentation about how to setup a nat gateway like https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html. Also please use this documentation https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html to correctly setup lambda with API gateway. Best regards, Andrii

profile picture
エキスパート
回答済み 8ヶ月前
0

Hello. Could you please accept the answer if it helps you? Best regards, Andrii

profile picture
エキスパート
回答済み 8ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ