Skip to content

Instantly share code, notes, and snippets.

@CodeFreezr
Created September 24, 2019 17:23
Show Gist options
  • Save CodeFreezr/1608e68c7468cc23504b3e90e9ee1a82 to your computer and use it in GitHub Desktop.
Save CodeFreezr/1608e68c7468cc23504b3e90e9ee1a82 to your computer and use it in GitHub Desktop.
List all Snapshots by their Volumes Count and Size.
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