Elastic Beanstalk and RDS MySQL connection timeout

0

So, I have a java application that I've deployed to Elastic Beanstalk and an RDS MySQL database instance. Everything works fine except atleast once a day the database connection stops working and I have to restart the EB instance. I'm assuming it's some configuration or something I'm missing; does anyone have any idea why this would happen?

asked 3 years ago765 views
4 Answers
0

Have you setup the inbound rules correctly. From my experience, once you set the inbound rules, there should be no issues. For information about setting up security group inbound rules, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html .

answered 3 years ago
0

So I need to create a specific MYSQL/Aurora inbound security group type for EB -> RDS?

Edited by: waterPrescription on Dec 15, 2020 7:17 AM

answered 3 years ago
0

Correct - its best practice to set the inbound rules so the IP of your Elastic Beanstalk instance is allowed to interact with the RDS instance. We cover that point in the AWS Tutorial that talks about creating a Java web app that interacts with RDS. See: https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2/usecases/Creating_rds_item_tracker .

See the section under Set up the RDS instance. I had this app deployed on AWS Elastic Beanstalk and once the inbound rules were setup, i never had database connectivity issues.

Edited by: PowerUserScott on Dec 15, 2020 9:33 AM

answered 3 years ago
0

thank you!

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions