The AWS S3 API lets you enable versioning on a bucket using the aws s3api put-bucket-versioning
command. Future objects written to that bucket are versioned, but existing objects are not.
But is there a quick way to enable versioning on individual, pre-existing objects in that bucket? It seems that the only naive solution is to make a copy of every object, delete the originals, then make a copy of the copies back over the original keys, which seems extremely inefficient.
I noticed there is a similar question here from 4 years ago without a resolution. Unfortunately, unlike the author of that question, I have about 1.3 PB of data in my bucket and the naive solution of copying twice might take a while.