How to Quickly Setup an RDS instance for a Java Application, on AWS


EC2 Instance, RDS Instance.

1) Create an RDS instance and note the endpoint of the instance.

2) Importing a Dump File to RDS.
SSH to an EC2 instance where the mysql dump is stored. 

3) Run the following command.mysql -h (Endpoint of RDS instance) -P 3306 -u root -p < (Dump file.sql)4)

4) Check if DB is created. (Login to RDS through EC2)mysql -h (Endpoint of RDS instance) -P 3306 -u root -pshow databases;use (intended db);show tables;

5) Use the new RDS instance from your EC2 instance.Change required parameters inside webapps/(App name)/WEB-INF/classes/META-INF/spring-persistence.xml

6) Restart the server on EC2

Reference: For Amazon Web Services (AWS) Course