Skip to content

Instantly share code, notes, and snippets.

@ivankeller
Created February 4, 2021 11:27
Show Gist options
  • Save ivankeller/71da9e0254378b59959b809374b44ab7 to your computer and use it in GitHub Desktop.
Save ivankeller/71da9e0254378b59959b809374b44ab7 to your computer and use it in GitHub Desktop.
display the list of s3 buckets ready to select
#!/usr/bin/env python
import boto3
s3client = boto3.client('s3')
response = s3client.list_buckets()
for bucket in response['Buckets']:
print(f"""\'{bucket['Name']}\',""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment