使用 AWS re:Post 即表示您同意 AWS re:Post 使用條款

RDS Read Replica - Users created in the primary not able to access read replica

0

We have RDS PostgreSQL and a Read Replica associated with it. We have noticed that the users created in the Primary cannot connect to the read replica. Are there additional steps required for the same?

Secondly, if we modify the master password of the read replica, does it impact the primary db master password?

We are not using AWS Secrets Manager

已提問 2 個月前檢視次數 69 次
1 個回答
0

There are a few important things to know about user access to PostgreSQL read replicas in Amazon RDS. By default, user accounts created on the primary RDS PostgreSQL instance are not automatically replicated to read replicas. This is for security reasons, to allow controlling access separately.

To allow users to connect to the read replica, you generally need to manually create those user accounts on the read replica as well. However, you should not directly create/modify users on a read replica since it's read-only.

A possible approach is to use the PostgreSQL replication mechanisms to replicate the user accounts. Specifically: On the primary instance, create the users inside a publication On the read replica, create a subscription to that publication

For administrative access, RDS provides a special rdsadmin user that can connect to read replicas. You can use this to perform necessary setup.

Make sure the security group and network ACLs allow connections from your application/users to the read replica endpoint.

Users connecting to the read replica need to be granted appropriate SELECT permissions on the tables they need to query.

If you modify the master password of the read replica, it does not impact the primary db master password, however it is not recommended to change anything on the read replica only, as it should stay as an exact copy of the primary Hope this helps

AWS
已回答 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南