Skip to content

Instantly share code, notes, and snippets.

@belenaj
Last active June 7, 2018 11:56
Show Gist options
  • Save belenaj/105ee3a2160571cdbd09da1817389caf to your computer and use it in GitHub Desktop.
Save belenaj/105ee3a2160571cdbd09da1817389caf to your computer and use it in GitHub Desktop.
How to get the size of an Amazon S3 bucket

s4cmd is the fastest way I've found (a command-line utility written in Python):

pip install s4cmd

Now to calculate the entire bucket size using multiple threads:

s4cmd du -r s3://bucket-name

using awscli native aws s3 ls --summarize --human-readable --recursive s3://bucket-name/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment