Configure Lambda without NAT for trigger API Gateway and use DocumentDB

0

It's possible, without NAT, use a Lambda from API Gateway and lambda need to access on DocumentDB?

Now I use NAT and I invoke Lambda from API Gateway. If I remove NAT, API Gateway go to timeout and I see on Lambda's log, timeout hit.

From Lambda I don't need internet access. I need to use only DocumentDB.

2回答
0
承認された回答

You do not need a NAT Gateway to invoke a Lambda function from API Gateway (or anywhere else). You need a NAT Gateway only if yout VPC attached Lambda needs to access resources outside the VPC.

In your case you attached the Lambda to the VPC because it needs to accesss DocumentDB, but you are probably trying to access some other AWS service, such as Secrets Manager, or Dynamo or S3, etc. To access other AWS services, you should either use a NAT Gateway, or better yet, a VPC Endpoint for the specific service you need to access.

profile pictureAWS
エキスパート
Uri
回答済み 1ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前
  • Yes! Need secret manager service endpoint. Thanks!

0

Yes, you can use VPC endpoint.

profile pictureAWS
エキスパート
回答済み 1ヶ月前

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

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

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

関連するコンテンツ