Skip to content

Instantly share code, notes, and snippets.

@ChillarAnand
Created July 28, 2019 13:08
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 ChillarAnand/a998d1f74dedb5e506940180a079ceb3 to your computer and use it in GitHub Desktop.
Save ChillarAnand/a998d1f74dedb5e506940180a079ceb3 to your computer and use it in GitHub Desktop.
s3-versioning
import boto3
bucket_name = 'avilpage'
s3 = boto3.resource('s3')
versioning = s3.BucketVersioning(bucket_name)
# check status
print(versioning.status)
# enable versioning
versioning.enable()
# disable versioning
versioning.suspend()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment