Skip to content

Instantly share code, notes, and snippets.

@tedder
Created September 7, 2012 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tedder/3665524 to your computer and use it in GitHub Desktop.
Save tedder/3665524 to your computer and use it in GitHub Desktop.
import boto
s3 = boto.connect_s3("key", "secret")
for bucket in s3.get_all_buckets():
if not bucket.name.islower():
print "-- skipping bucket, cannot handle uppercase bucket names: " + bucket.name
continue
for file in bucket:
print "\t\t" + str(file.size) + "\t" + file.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment