AWS S3 VersioningΒΆ
We can set up versioning when creating a bucket, but we can also do that for the existing ones.
We can go to the Properties tab and the very first option will be to enable the versioning.
Now in our object list there will be an option to show versions. We can see that when the object is first created, it's version is null.
If we upload a file, we'll see that it will assign version ID to it.
If we upload the same file again, we'll see that the second file now has 2 version IDs.
Now if we toggle off the version information and delete the file:
Now we can see that there is a delete marker added that tells AWS that the file was deleted.
If we delete the delete marker. (this is a permanent delete)
Now we can see that we have rolled back the file to a previous version:
If you are to suspend the versioning, all the previously created versions will persist but all the new files will have version number of null.