Durch die Nutzung von AWS re:Post stimmt du den AWS re:Post Nutzungsbedingungen

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

1 Antwort
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
beantwortet vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen