Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/kanmu/rdsauth
- Owner: kanmu
- License: mit
- Created: 2024-12-04T07:22:14.000Z (22 days ago)
- Default Branch: main
- Last Pushed: 2024-12-05T02:29:49.000Z (21 days ago)
- Last Synced: 2024-12-05T02:32:56.995Z (21 days ago)
- Topics: aws, golang, iam, rds
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 URLFlags:
-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=>
```