Problem:
Need to experiment with S3 versioning and understand.
Solution Summary:
We will create a new bucket, enable versioning and experiment with it.
Prerequisites:
This lab assumes that you have already setup AWS account, have explored S3 and created a bucket before.
Solution Steps:
-
Create a bucket, enabling versioning (click on Versioning during create wizard, enable versioning and save) and giving necessary permissions (give read object permission for all). Once you enable versioning for a bucket, it can never be removed, but can be disabled.
-
Create a text file in desktop with some text contents and upload it. Give Everyone read object permission and leave all other options as is.
-
When you click on the file and go to the overview page, you can see a version dropdown next to the filename. Currently there will be only one version.
-
Modify the text file in local system and upload it again with similar permissions.
-
When you go to the overview page, you can see a version dropdown next to the filename. Currently there will be two different object. Total size used will be the sum of all the versions.
-
Delete one of the versions from the version dropdown in file’s overview page. If you delete a version, you cannot restore it. You will need to upload it again.
-
Delete the file itself (not version) from the bucket overview page.
-
Now click on the Deleted Objects tab on the bucket overview page and restore it (Select file. More > Undo Delete). In case, you are using the old console this was done differently: Deleting an object in a versioned bucket merely creates a Delete Marker as the most recent version. Deleting that marker will restore that file. Internally AWS still uses delete markers.
Comments
completed
completed
completed, good
completed, good