FATAL: password authentication failed for user "postgres", after "docker-compose up -d" on your EC2 AMI

I encountered the same error because a postgres instance already existed on the machine. My solution was just to start completely from scratch ensuring no postgres instance exists already so the passwords are not out of sync. (see – CentOS 7 enabled setup.sh) Sounds like you’re running a setup script; are you running it more than once? Try starting from a completely new machine without postgres.

1 Like

Thanks, but were you using Docker? because I am using docker so I get rid of the container many times and did the installation back and even with that I am still getting the same issue.

I was using docker – basically followed all this: CentOS 7 enabled setup.sh
It’s possible your issue’s distinct from mine though.