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.

2 Answers
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
EXPERT
answered a month ago
  • 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
EXPERT
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions