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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠