Last active
January 10, 2023 15:06
-
-
Save tanmay-bhat/7ba9887424ed4bca9851d6c9af396037 to your computer and use it in GitHub Desktop.
AWS CLI command to list all RDS snapshots older than 7 days :
This file contains hidden or 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
aws rds describe-db-snapshots --query "DBSnapshots[?SnapshotCreateTime<='$(date -v-7d +%Y-%m-%dT%H:%M:%SZ)'].{DBSnapshotIdentifier:DBSnapshotIdentifier, DBInstanceIdentifier:DBInstanceIdentifier,SnapshotCreateTime:SnapshotCreateTime}" --region <region> --output table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment