Nag
Nag

Reputation: 377

Unable to connect to AWS RDS restored instance

I have created a RDS instance with PostgreSQL database connected in PGAdmin tool and also connected the instance with the help of psql from local system

psql --host=XXX.XXX.us-east-1.rds.XX.com --port=5433 --username=myusername --password --dbname=MyDB

I have performed several DB operation and then i have deleted the instance and saved the final snapshot of my instance before deleting.

And then i have restore the final snapshot and started the instance again and now am unable to connect to this instance

What goes wrong when restoring the RDS snapshot...?

Upvotes: 1

Views: 2959

Answers (3)

louielyl
louielyl

Reputation: 1062

  1. Check Security Group, AWS will not add the security group for you based on your old instance.
  2. Check Publicly accessible, same reason for point 1.
  3. Make sure you input the correct initial Database name.

This is how I solved my problem.

Upvotes: 4

ahmkara
ahmkara

Reputation: 907

Check VPC configuration, when restoring probably you selected to create new VPC security group which denies most IPs by default.

Upvotes: 2

DALDEI
DALDEI

Reputation: 3732

When you delete an instance, all properties associated with it are deleted or detached. This is not the same as stopping an ec2 instance. you need to fully recreate the RDS instance identically to the previous instance. you may not be Assigned the same IP address, endpoint name. security groups, routing associations, VPC and zone placement all need consideration. It is best to use a script or cloud formation to do this as its nearly impossible to replicate the configuration exactly by memory. IP and DNS may need to be changed on your client app. A common mistake is to neglect to set public Access who's is off by default, but often enabled for development while learning the subtleties of private sub nets, security groups,route tables etc.

Upvotes: 2

Related Questions