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 (https://serverfault.com/questions/941886/connect-an-aws-lambda-function-triggered-by-api-gateway-to-aurora-serverless-mys) 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, 2022 in AWS by Rahul
• 9,670 points
716 views

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, 2022 in AWS by anonymous
927 views
0 votes
0 answers

Convert oracle UDF function with to_number and value_error expection in it to AWS RDS maria db

create or replace FUNCTION num_check (p_string IN ...READ MORE

Dec 14, 2022 in AWS by Tejashwini
• 3,820 points
215 views
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
9,690 views
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,090 points
9,625 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP