Can't seem to connect to database

0

I have an RDS Postgres instance in which I created a database and I can't seem to find the database anymore. I haven't logged into the database in a few weeks but when I tried connecting using Postico & psql, I keep getting the following error:

FATAL: database "" does not exist

I'm using the correct AWS region. I've made no changes recently.

I connected using the hostname using psql to list databases and it doesn't show the database anymore. Could it have been deleted somehow?

There are only snapshots of the database for the past 3 days. Events only go back 3 days as well.

How do I debug further?

1 Answer
0

Hi,

I'll suggest to use AWS Cloudtrail, which is our service that helps you audit your AWS account. AWS Cloudtrail is enable when you create your account. Here you will be able to see any interaction with Amazon RDS API. For example, if you go to AWS CloudTrail > Event History > Lookup Attributes (Select Resource Type) > AWS::RDS::DBInstance you can see who delete, modify or create the DB instance, and from there start debugging what happened. Please see more reference in here: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/logging-using-cloudtrail.html

In a general note, when you create a Amazon RDS instance you have by default deletion protection and automatic backup every 7 days.

Thanks.

profile pictureAWS
Arifc
answered 6 months 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