Skip to content

Instantly share code, notes, and snippets.

@Gabriellpweb
Created May 4, 2018 16:48
Show Gist options
  • Save Gabriellpweb/b9886753a65250a44e2119456e27678d to your computer and use it in GitHub Desktop.
Save Gabriellpweb/b9886753a65250a44e2119456e27678d to your computer and use it in GitHub Desktop.
List AWS RDS Instances
#!/bin/bash
# USAGE: rdsls sa-east-1
# OUTPUT:
# Name |Engine |Ec2Type |CreatedAt
# myrdsdb |postgres@9.6.6 |db.t2.micro |2017-09-20T18:54:21.212Zs
aws --region $1 rds describe-db-instances \
| jq '.DBInstances[] | "\(.DBInstanceIdentifier) \(.Engine)@\(.EngineVersion) \(.DBInstanceClass) \(.InstanceCreateTime)"' \
| column -t -N 'Name,Engine,Ec2Type,CreatedAt' -o ' |' \
| sed -e 's/\"/\s/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment