Skip to content

Instantly share code, notes, and snippets.

@sebsto
Created November 15, 2019 14:36
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 sebsto/6f88013d2382b6eddcd3f35b2718e382 to your computer and use it in GitHub Desktop.
Save sebsto/6f88013d2382b6eddcd3f35b2718e382 to your computer and use it in GitHub Desktop.
Amazon S3 - List all your buckets (aka 'ls' command)
import boto3
s3 = boto3.resource('s3')
for bucket in s3.buckets.all():
print(bucket.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment