Reputation: 23
How can I create this scenario:
- A private subnet-1
- Lambda in subnet-1
- RDS in subnet-1(same subnet with Lambda)
- Both inside the same VPC.
is the above feasible and is it a good architecture ?
I have tried implementing it only issue is, it's timing out. But, when the Lambda is out of the subnet-1 it's working fine.
My understanding is since both RDS and Lambda are in the same subnet they should easily communicate.
Upvotes: 1
Views: 1171
Reputation: 269284
It is perfectly okay to have Amazon RDS and the AWS Lambda function connected to the same private subnet.
Some things to note:
Lambda-SG
)RDS-SG
) should permit inbound access on the appropriate port (eg 3306
for MySQL) from Lambda-SG
.That is, RDS-SG
should permit inbound connections from Lambda-SG
.
Upvotes: 2