Skip to content

Instantly share code, notes, and snippets.


mrchilds/S3 Size

Created Nov 21, 2013
What would you like to do?
S3 Bucket Size
# Crude but does the job
from boto.s3.connection import S3Connection
conn = XXX
rs = conn.get_all_buckets()
# Get bucket
bucket_name = 'XXX'
for b in rs:
if == bucket_name:
bucket = b
total_bytes = 0
for key in bucket:
total_bytes += key.size
Out[21]: 365139901385
340 Gb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.