My replica is stuck in an ERROR state because it can't connect to the source database using the rdsrepladmin role—the system continuously reports an authentication failure.
This problem began after upgrading my RDS PostgreSQL instance from version 12 to 16. PostgreSQL 12 used md5 for password encryption, while version 16 uses scram.
The source database logs display this error:
Connection matched file "/rdsdbdata/config/pg_hba.conf" line 22: "host replication rdsrepladmin 10.1.3.47/32 scram-sha-256"
:FATAL: password authentication failed for user "rdsrepladmin"
:rdsrepladmin@[unknown]:[16634]:DETAIL: User "rdsrepladmin" does not have a valid SCRAM secret.
I attempted to reset rdsrepladmin's password scram, but it seems like the role is protected and managed solely by AWS. I also tried modifying the some of the parameter groups option (password encryption) for both the source and replica databases to use md5 instead of scram, but that didn't resolve the issue.
It seems like authentication configuration is managed within the pg_hba.conf file, to which AWS doesn't provide access. I thought about changing the confirm inside that file to force decryption via md5, but that's a silly work around and doesn't solve the root cause of the issue.
Is there something that I'm missing here? What are my options?