Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kanmu/rdsauth

rdsauth is a tool to generate an auth token used to connect to a db with IAM credentials.
https://github.com/kanmu/rdsauth

aws golang iam rds

Last synced: 20 days ago
JSON representation

rdsauth is a tool to generate an auth token used to connect to a db with IAM credentials.

Awesome Lists containing this project

README

        

# rdsauth

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

rdsauth is a tool to generate an auth token used to connect to a db with IAM credentials.

## Download

https://github.com/kanmu/rdsauth/releases/latest

## Usage

```
Usage: rdsauth [flags]

Arguments:
Database URL

Flags:
-h, --help Show help.
-e, --export Output as environment variable.
--version
```

### PostgreSQL

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

### MySQL

```sh
$ MY_DB_HOST=database-1.cluster-abcdef012345.us-east-1.rds.amazonaws.com
$ $(rdsauth -e mysql://scott@$MY_DB_HOST)
$ mysql -h $MY_DB_HOST -u scott --enable-cleartext-plugin
...
mysql>
```

### CNAME support

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

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