Skip to content

Instantly share code, notes, and snippets.

@neps-in
Forked from cupracer/s3-bucket-stats.sh
Created March 16, 2019 16:17
Show Gist options
  • Save neps-in/02e5cbd8cae56ef322995d9103cf8379 to your computer and use it in GitHub Desktop.
Save neps-in/02e5cbd8cae56ef322995d9103cf8379 to your computer and use it in GitHub Desktop.
Amazon S3 CLI: get bucket stats
aws s3api list-objects --bucket <bucket-name> --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