Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
winebarrel authored Dec 4, 2024
1 parent 97f9135 commit fc913ef
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
# rdsauth
# rdsauth

[![CI](https://github.com/winebarrel/rdsauth/actions/workflows/ci.yml/badge.svg)](https://github.com/winebarrel/rdsauth/actions/workflows/ci.yml)

Generates an auth token used to connect to a db with IAM credentials.

## Usage

```sh
$ MY_DB_HOST=database-1.cluster-abcdef012345.us-east-1.rds.amazonaws.com
$ export PGPASSWORD=$(rdsauth postgres://scott@$MY_DB_HOST)
$ psql -h $MY_DB_HOST -U scott
...
postgres=>
```

### CNAME support

```sh
$ dig +short cname my-db.example.com
database-1.cluster-abcdef012345.us-east-1.rds.amazonaws.com

$ export PGPASSWORD=$(rdsauth postgres://[email protected])
$ psql -h my-db.example.com -U scott
...
postgres=>
```

0 comments on commit fc913ef

Please sign in to comment.