AWS Lambda in VPC with RDS and Internet Connection

0 votes

I set up an Aurora Database in a newly created VPC and no public accessibility. As I want to run a Lambda function in the VPC that is able to both, access the RDS instances as well as the Internet, I changed the routing tables of the RDS instances to allow traffic from a NAT gateway which I placed in a public subnet in the same VPC.

For the Lambda function itself, I created a separate private subnet, also just allowing traffic from the NAT gateway in the routing table. I assigned this subnet and VPC to the Lambda function in the Lambda settings. The internet connection works fine with this configuration but I can not access the database. That's why I followed this post ( and added the IP CIDR of the Lambda subnet to the Security Group of the RDS instances 

Still, the Lambda function is able to interact with the public internet but can not connect to the RDS instances (timeout). I'm running out of ideas, what is wrong here?

Apr 21 in AWS by Rahul
• 8,980 points

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In AWS

0 votes
1 answer

Why AWS recommends to avoid the use of public/internet gateways in favor of AWS PrivateLink and VPC endpoints?

Public applications are available over the internet. ...READ MORE

answered Feb 9 in AWS by anonymous
0 votes
1 answer
+1 vote
1 answer
0 votes
3 answers

How to check instance state and status via Lambda function in AWS?

import boto3 from pprint import pprint def lambda_handler(event, context):          # ...READ MORE

answered Sep 8, 2020 in AWS by Shrikant
• 180 points
0 votes
1 answer

Email notification using SNS topic and Lambda function in AWS?

Hi@akhtar, You can set notification system for your ...READ MORE

answered Apr 2, 2020 in AWS by MD
• 95,340 points
0 votes
1 answer

how to access AWS S3 from Lambda in VPC

With boto3, the S3 urls are virtual by default, ...READ MORE

answered Sep 28, 2018 in AWS by Priyaj
• 58,060 points
0 votes
1 answer
Send OTP
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP