Skip to content

Instantly share code, notes, and snippets.

@kachina
Last active December 10, 2020 02:52
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 kachina/4dc2b1d91b5ee81a6d2aeacc79142b91 to your computer and use it in GitHub Desktop.
Save kachina/4dc2b1d91b5ee81a6d2aeacc79142b91 to your computer and use it in GitHub Desktop.
import os
import boto3
def main():
s3_client = boto3.client('s3')
response = s3_client.list_objects_v2(Bucket='example-bucket')
for content in response['Contents']:
print(content['Key'])
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment