Created
September 24, 2019 17:23
-
-
Save CodeFreezr/1608e68c7468cc23504b3e90e9ee1a82 to your computer and use it in GitHub Desktop.
List all Snapshots by their Volumes Count and Size.
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
aws ec2 describe-snapshots --owner-ids self | jq '.Snapshots | [ group_by(.VolumeId)[] | { (.[0].VolumeId): { "count": (.[] | length), "size": ([.[].VolumeSize] | add) } } ] | add' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment