Created
July 28, 2019 13:08
-
-
Save ChillarAnand/a998d1f74dedb5e506940180a079ceb3 to your computer and use it in GitHub Desktop.
s3-versioning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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