Skip to content

Instantly share code, notes, and snippets.

@Djarnis
Created July 16, 2015 23:27
Show Gist options
  • Save Djarnis/745c74c647248eb5666a to your computer and use it in GitHub Desktop.
Save Djarnis/745c74c647248eb5666a to your computer and use it in GitHub Desktop.
Get count & size of s3 bucket using AWS CLI
aws s3api list-objects --bucket YOURBUCKETNAME --output json --query "[sum(Contents[].Size), length(Contents[])]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment