Skip to content

Instantly share code, notes, and snippets.

@K-Mistele
Created December 22, 2020 22:25
Show Gist options
  • Select an option

  • Save K-Mistele/f773df1c0d0eb43e6627bdb790575c7e to your computer and use it in GitHub Desktop.

Select an option

Save K-Mistele/f773df1c0d0eb43e6627bdb790575c7e to your computer and use it in GitHub Desktop.
Using the Bucket API's Exceptions
try:
bucket = S3.Bucket('my-bucket-name')
data, metadata = bucket.get('some key')
except S3.Exceptions.NoSuchBucket as e:
# some error handling here
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment