Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using IAM Role to allow access to MySQL database on RDS

I have an IAM Role, myRole, for my project. I have an RDS server with a MySQL instance on it. The MySQL instance requires a username and password, however I don't want to pass these in as plaintext via command line, nor store them somewhere for retrieval later.

What I would like to do is somehow use the IAM Role as authentication in order to be able to perform backups, etc.

Is this possible?

like image 888
Connor Spangler Avatar asked Oct 16 '25 04:10

Connor Spangler


2 Answers

It is now possible for MySQL or Amazon Aurora:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html

like image 101
Brett Avatar answered Oct 17 '25 19:10

Brett


This isn't possible. IAM is for AWS resources. As related to RDS you would use IAM to give someone permission to create or modify an RDS server. The MySQL database engine doesn't know that it is running on AWS and doesn't know anything about IAM roles, so it can't use that for user authentication. You have to stick with username/passwords for authentication to the database.

Update 12/13/2017: You can now use IAM authentication for RDS MySQL and Aurora.

like image 30
Mark B Avatar answered Oct 17 '25 20:10

Mark B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!