I had a S3 bucket for a while, but now it's already on. Experimenting with it a bit, trying to figure out what protection measures that I encounter only with the version, without activating the "MFA delete" option.
I downloaded the test file, then deleted it, and then reloaded it twice. Now, using the S3 browser tool , I see 4 versions of the file: # 1, # 2 (deleted), # 3 and # 4 (current). If I use bototo get the latest version, I can extract it version_id:
import boto
c=boto.connect_s3()
b=c.get_bucket('my-bucket')
k = b.get_key('test2/dw.txt')
print k.version_id
But how do I get the full version_id list for a given key? And if I want to get version No. 1 of the key (deleted), do I need to do something first, using version identifier No. 2 to "restore it"?
Finally, does this deletion protection (create a delete token) work with legacy files that were downloaded before the version was launched?
thank
source
share