Using IAM Role for master username and password on RDS

674 Views Asked by At

Need to access RdS database with iam role for master username and master password. I can use IAM role for database user. Any suggestions?

1

There are 1 best solutions below

0
On

By definition iam authentication opposes pass authentication.

You could to it for the master role by granting it the rds_iam role inside of your db, but it will have all the rights granted to it.

If you want to do it for another role you can, you have to create a user/role in the local database and grant it the rds_iam role (or its equivalent in other db engine than postgres) and enable iam authentication on your rds instance or cluster, and then configure an iam role+policy to make this work.

To connect to the db with iam though you will in fact need the username (if you have done this for the master account then it will be the master username and if you have done it for another created user, it will be its username), but the password have to be a token generated with aws rds command or others ways, to connect via iam there is no need of a password, its password-less :)

here is a link you can follow: https://aws.amazon.com/premiumsupport/knowledge-center/users-connect-rds-iam