Issue
I have Postgres RDS instance which was available and working 7 days ago. Today I noticed in my app log, which is hosted in an EC2 instance that connectivity fails with
FATAL: password authentication failed for user "postgres".
Same when I try to connect from my local machine (was just fine 1 week ago). How come my master user is not able to login anymore? What could might have happened? Is it blocked somehow, expired or stucked? What I tried so far is rebooting the RDS instance and executed the automatic RDS troubleshooting, no success. Any hint would be appreciated.
Solution
This error would only occur for one reason which is invalid authentication information. Perform the following checks:
- Check the username is correct (is postgres the username you specified when creating the RDS DB, you can validate this in the console)
- Check the password is correct
Assuming both of these values you specified you believe to be correct, you should reset the password from the RDS management console.
Regarding rotation of the password, outside of an IAM user/IAM role modifying the password (which could be validated via CloudTrail). This could be programmatic or via the console.
Can you also ensure you have not setup password rotation via Secrets Manager.
Answered By - Chris Williams Answer Checked By - Clifford M. (WPSolving Volunteer)