Reputation: 4409
Is it possible to access a publicly available RDS instance from a Lambda expression in the same VPC, without using a NAT? Could you please point me in the right direction to confugure this? Thanks.
RDS and Lambda have the same VPC, the same Subnets, the same Security group. The security group has 2 inbound rules:
Is that correct?
Upvotes: 4
Views: 1159
Reputation: 269101
The recommended configuration is:
Lambda-SG
). It does not require any inbound rules.DB-SG
). It should allow an Inbound connection on the appropriate port (3306?) from Lambda-SG
.That is, DB-SG
should specifically reference Lambda-SG
as the source of the inbound connection.
Upvotes: 4
Reputation: 4409
Turns out that the Lambda was timing out RDS connection, due to callback deadlock like explained here: https://stackoverflow.com/a/42619071/2373113 Other thing to notice is that traffic inside the same security group must be explicitly enabled in rules.
Upvotes: 0