Lambda Function not connecting to DynamoDB via VPC

0

Have set up a Lambda function (which works). However, when a VPC is added it no longer can access DynamoDB. Permissions exist. Route table exists. Subnets exist. VPC endpoints exist. Everything seems to have required permissions. Lambda function has necessary IAM permissions to access DynamoDB. IAM role associated with the Lambda function has the required permissions to access DynamoDB. VPC configuration includes the necessary route table entries and subnets. Also configured VPC endpoint for DynamoDB. Looking for ideas on how to resolve. No CloudWatch logs or anything useful as attempted to connect to DB just times out.

已提問 1 個月前檢視次數 151 次
2 個答案
0

Hi,

About the networking configuration that you mention: is access to public Internet possible (i.e existence of a default route) and allowed (via proper sec groups? ? Unless you make special provision (VPC endpoint for DDB), DDB will be accessed by the lambda via the public AWS service endpoints.

Best,

Didier

profile pictureAWS
專家
已回答 1 個月前
  • Thanks Didier. Yes it is possible and there is a route and the security group has the permissions and I don't have an issue with it going through the public service endpoints - it just won't connect and as far as I can see everything is permissioned correctly and has the right policies attached. I created an EC2 instance to check the VPC could allow that to connect to DynamoDB and that worked - I can only assume the lambda function aspects are the issue. Not so much the security group but the lambda function execution role.

0

What about DNS? Do you have EnableDnsSupport set to true for the VPC?

profile pictureAWS
專家
已回答 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南