Created
May 4, 2018 16:48
-
-
Save Gabriellpweb/b9886753a65250a44e2119456e27678d to your computer and use it in GitHub Desktop.
List AWS RDS Instances
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# USAGE: rdsls sa-east-1 | |
# OUTPUT: | |
# Name |Engine |Ec2Type |CreatedAt | |
# myrdsdb |[email protected] |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