{"repo":"haines/pg-aws_rds_iam","free":true,"listed":false,"github":"https://github.com/haines/pg-aws_rds_iam","clone":"git clone https://github.com/haines/pg-aws_rds_iam.git","description":"IAM authentication in Ruby for PostgreSQL on Amazon RDS","language":"Ruby","stars":78,"topics":["aws","rds","iam","postgresql","ruby"],"license":"MIT","category":"databases-storage","readme_excerpt":"PG::AWS RDS IAM &ensp; PG::AWS RDS IAM is a plugin for the pg gem that adds support for IAM authentication when connecting to PostgreSQL databases hosted in Amazon RDS. IAM authentication allows your application to connect to the database using secure, short-lived authentication tokens instead of a fixed password. This gives you greater security and eliminates the operational overhead of rotating passwords. Installation Install manually: or with Bundler: Usage To use IAM authentication for your database connections, you need to 1. enable IAM authentication for your database, 2. provide your application with IAM credentials, and 3. configure your application to generate authentication tokens. 1. Enable IAM authentication for your database Start by configuring your database to allow IAM authentication using either the AWS console or the aws CLI. This doesn't require downtime so is safe to apply immediately, unless you already have pending modifications that require a database reboot. Next, grant your database user the rds iam role. 2. Provide your application with IAM credentials The most secure way to grant your application permission to connect to your database is to use an IAM role. Start by creating a service role if your application doesn't already have one. Then, create an IAM policy granting the rds-db:connect permission and attach it to the role. If you've created a new service role, you'll need to associate it with your application. The way to do this depends on where ","default_branch":null,"files":null,"tree":[],"storefront":"/r/haines","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/haines/pg-aws_rds_iam/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}