[Recipes] Amazon S3 Versioning Lab


Need to experiment with S3 versioning and understand.

Solution Summary: 

We will create a new bucket, enable versioning and experiment with it.


This lab assumes that you have already setup AWS account, have explored S3 and created a bucket before.

Solution Steps: 

  1. 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.

  2. 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.

  3. 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.

  4. Modify the text file in local system and upload it again with similar permissions.

  5. 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.

  6. 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.

  7. Delete the file itself (not version) from the bucket overview page.

  8. 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.

Recipe Tags: 


lijo's picture


sireesha A's picture

completed, good

Learn Serverless from Serverless Programming Cookbook


Please first use the contact form or facebook page messaging to connect.

Offline Contact
We currently connect locally for discussions and sessions at Bangalore, India. Please follow us on our facebook page for details.
WhatsApp (Primary): (+91) 7411174113
Phone (Escalations): (+91) 7411174114

Business newsletter

Complete the form below, and we'll send you an e-mail every now and again with all the latest news.


CloudMaterials is my blog to share notes and learning materials on Cloud and Data Analytics. My current focus is on Microsoft Azure and Amazon Web Services (AWS).

I like to write and I try to document what I learn to share with others. I believe that knowledge is useless unless you share it; the more you share, the more you learn.

Recent comments

Photo Stream