Skip to content

Instantly share code, notes, and snippets.

@lmayorga1980
Created April 17, 2018 02:06
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 lmayorga1980/4cdcfe82db484e7a943c9f1137a4dc7a to your computer and use it in GitHub Desktop.
Save lmayorga1980/4cdcfe82db484e7a943c9f1137a4dc7a to your computer and use it in GitHub Desktop.
Remove S3 Bucket with Versions
BUCKET='<my_bucket>'
import boto3
s3 = boto3.resource('s3')
bucket = s3.Bucket(BUCKET)
bucket.object_versions.delete()
bucket.delete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment