Reputation: 3190
I have an AWS RDS that is correctly set up to allow inbound traffic on port 3306 from an ELB that load balances two EC2 instances. This is all working as it should, and has been for some time.
I'm now deploying a new application to a Laravel Vapor environment, which also needs to connect to the same RDS. The application is deployed and accessible in a browser - but as soon as the DB comes into play (login), it times out and throws a Gateway error.
My Vapor environment is configured to use the same subnets as the RDS, and belongs to the same VPC. I have confirmed this in the AWS console.
I created a new security group specifically for the Vapor resources, and this is also specified in the vapor.yml. I can also confirm that this is attached to the Vapor lambdas as expected.
I have added an inbound rule to the security group attached to the RDS to allow ALL traffic from the Vapor security group. I have variously experimented with opening port 3306 only, but eventually broadened to ALL incoming traffic from that SG.
I continue to see exactly the same issue - timeout when making a DB request.
I still believe this to be a network security issue - if the DB credentials were wrong then I wouldn't expect a timeout, I would expect an application error of some kind. Can anybody see anything I've missed here, or point me to the logs that I'd need to look at to work out what's wrong with my setup?
Upvotes: 1
Views: 644
Reputation: 37490
I like to use security groups in pairs, or chain them if you have more than a couple tiers in your architecture. So for your scenario:
Pairs: (you need one extra group for the public)
Chaining:
Upvotes: 2