2
votes

I have an RDS database running (postgres) that I'm now trying to connect to an Elastic Beanstalk application. The connection times out.

I am guessing this has something to do with the VPC and security groups, but AWS continues to confuse me here and I'm kind of new to this. I'm trying follow this guide: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html?icmpid=docs_elasticbeanstalk_console

When I try to add the rds_launch_wizard security group to the EB instance, it tells me that the security group is not found. rds_launch_wizard is in a VPC, whereas the EB application is not.

I have tried going into the EB configuration, choosing Instance and trying to add a security group:

  • By name, this pops up an error saying that "I cannot add groups by name".
  • By group ID, this tells me group sg-xxxxx not found.
  • Similarly, I can't add the EB security group to RDS, as this is also not found

How do I get the two talking to each other?

enter image description here

1
How is your EB application not in a VPC? Do you have a very old AWS account? VPC has been a requirement for several years now. Do you have ClassicLink enabled? docs.aws.amazon.com/AWSEC2/latest/UserGuide/…Mark B
@MarkB Not sure, I got added to an existing account as a developer. I added a picture of the security groups if that helps.Jorg

1 Answers

4
votes

You have two options:

  • Move the EB environment into the VPC
  • Enable ClassicLink so that your EC2 Classic instances inside your EB environment can talk to the VPC.

ClassicLink is the obvious quick fix, but I think you will eventually want to move everything into a VPC. The VPC is more secure and there are quite a few features and services now on AWS that require a VPC.