使用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 个月前68 查看次数
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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容