Skip to content

Instantly share code, notes, and snippets.

@oscarojasgtz
Created December 6, 2022 16:57
Show Gist options
  • Save oscarojasgtz/4c0193aa57e41ec1e2b72adbf2b9f175 to your computer and use it in GitHub Desktop.
Save oscarojasgtz/4c0193aa57e41ec1e2b72adbf2b9f175 to your computer and use it in GitHub Desktop.
import boto3
s3_resource = boto3.resource('s3')
buckets = []
for bucket in s3_resource.buckets.all():
buckets.append(bucket.name)
print(buckets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment