Este conteúdo não está disponível no idioma selecionado
Estamos trabalhando constantemente para disponibilizar conteúdo no idioma selecionado. Agradecemos sua paciência.
How do I create another user with the same privileges as a default user for my Amazon RDS or Aurora DB instance with PostgreSQL?
2 minuto de leitura
0
I have an Amazon Relational Database Service (Amazon RDS) or an Amazon Aurora DB instance that runs PostgreSQL. I want another user to have the same permissions as the default (master) user for my DB instance. I want to duplicate or clone the default user.
Resolution
A DB instance that runs PostgreSQL has only one default user (sometimes called a master user) that's created when the instance is created. However, you can create another user that has all the same permissions as the default user.
Note: The rds_superuser role has the most privileges for an RDS DB instance. Don't assign this role to a user unless they need the most access to the RDS DB instance.
To create a new user, run the CREATE ROLE with the CREATEDB, CREATEROLE, and LOGIN options. Replace new_master and password with your user name and password.
postgres=> CREATE ROLE new_master WITH PASSWORD 'password' CREATEDB CREATEROLE LOGIN;
Grant the role that you created rds_superuser permissions. Replace new_master with your user name.
postgres=> GRANT rds_superuser TO new_master;
The new user now has the same permissions as the default user.