Home Connect to Amazon RDS Postgresql with IAM Role
Reply: 1

Connect to Amazon RDS Postgresql with IAM Role

joosts Published in 2017-12-07 10:51:02Z

I try to give my EC2 instance access to my AWS RDS Postgresql database via IAM.

First, I've created a policy:

    "Version": "2012-10-17",
    "Statement": [
            "Effect": "Allow",
            "Action": [
            "Resource": [

After that I attached this policy to a role, which I attached to this specific EC2-instance. Everything seems to be fine till now.

When ssh to that specific EC2 instance and try to connect to the database, psql still prompts for a password.

Anyone knows how to accomplish it that I can connect without needing to use a password?

John Rotenstein
John Rotenstein Reply to 2017-12-07 23:33:23Z

This is not possible.

AWS Identity and Access Management (IAM) is used to grant permissions for the RDS service (eg creating, backing up and deleting clusters). However, it cannot be used to grant login access to an Amazon RDS PostgreSQL database. Instead, use normal Users defined within PostgreSQL.

Such access is only available for MySQL and Aurora.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.297067 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO