Understanding Versioning for Amazon S3 Buckets

Arish AhmadArish Ahmad
2 min read
  1. Open the AWS Management Console and navigate to the S3 dashboard.

  2. Click Create bucket.

  3. Select General purpose bucket type.

  4. Write a bucket name, this name must be globally unique.

  5. Select ACLs enabledObject Ownership.

  6. Uncheck Block all public access -> Check the Acknowledgement.

  7. Enable Bucket Versioning.

  8. Click Create bucket.

  9. Open the newly created bucket by clicking on its name.

  10. Click Upload.

  11. Now click on Add files.

  12. Select any file you want to upload, preferably a text file.

  13. Scroll and click Upload.

  14. Select the object -> Actions -> Make public ACL -> Make Public.

  15. Now select the object -> Copy URL -> Paste it into another tab, and the file should open.

  16. Select the file -> Delete -> type "delete" -> Click Delete objects.

  17. Now enable Show versions. Now you'll be able to see the deleted text file and the Delete Marker. If this delete marker is deleted then the text file can be recovered.

  18. Select the delete marker -> Delete -> type "permanently delete" -> Click Delete Objects.

  19. Disable the Show version. You will see the text file is recovered. To delete the file permanently, delete the text file while Show versions is enabled before deleting the marker.

    Note: Deleting anything while Show versions is enabled will result in permanent deletion.

  20. Now open this text file on your computer and make a few changes to it.

  21. Now upload the file again. The file will be updated.

  22. Select the object -> Actions -> Make public ACL -> Make Public.

  23. Now select the object -> Copy URL -> Paste it into another tab, and the file should open. You can see the changes made.

  24. Now enable the Show version, and you'll see the same file name two times, the one with 'L' is the old file and the other one is the new file.

  25. Delete the file without 'L'.

  26. Disable the show version.

  27. Now select the object -> Copy URL -> Paste it into another tab, and the file should open. You'll see that the older version of the file.

  28. To delete the object, select the object ->Click Delete -> type permanently delete -> Click Delete Objects.

  29. To delete the bucket, select the bucket -> Click Delete -> type the bucket name -> Click Delete bucket.

0
Subscribe to my newsletter

Read articles from Arish Ahmad directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Arish Ahmad
Arish Ahmad

Final-year BTech student specializing in software development. Completed a Flutter internship and amassed three years of project experience, crafting Threads clone, Stream Arbiter, Ticketify, and Google Docs. Proficient in C++, having successfully solved 250+ LeetCode questions.