Skip to content

Instantly share code, notes, and snippets.

@albarki
Created July 7, 2018 21:46
Show Gist options
  • Save albarki/3588354ef11a137e199e29381fb07de1 to your computer and use it in GitHub Desktop.
Save albarki/3588354ef11a137e199e29381fb07de1 to your computer and use it in GitHub Desktop.
Get List of RDS instances from All regions
for region in `aws ec2 describe-regions --output text | cut -f3`
do
echo -e "\nListing RDS in region:'$region'..."
aws rds describe-db-instances \
--region $region \
--query 'DBInstances[*].[DBInstanceIdentifier,ReadReplicaDBInstanceIdentifiers]'
done
@aardbol
Copy link

aardbol commented Aug 12, 2024

for region in `aws ec2 describe-regions --output text | cut -f4`
do
echo -e "\nListing RDS in region:'$region'..."
aws rds describe-db-instances \
        --region $region \
        --query 'DBInstances[*].[DBInstanceIdentifier,ReadReplicaDBInstanceIdentifiers]' --output text | cat
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment