What is Versioning and how to use it in AWS S3 bucket

What is Versioning and how to use it in AWS S3 bucket

Versioning is a means of keeping multiple variants of an object in the same bucket. You can use versioning to preserve, retrieve, and restore every version of every object stored in your Amazon S3 bucket. With versioning, you can easily recover from both unintended user actions and application failures. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. In this guide, we will see how to do that.

In our previous guide, we have created a s3 bucket and added some files in it.

1 16 1024x443 1

Now if we have a newer version of these files, we can upload the newer files to the same bucket without removing the old files with the help of versioning. First you have to go to bucket properties and enable versioning

2 15 1024x380 1

Click on the edit button, enable it and save the changes

3 15 1024x455 1

Now when you go to the objects tab, you can see the version ID column.

4 14 1024x344 1

We will now add the new version of files to the same bucket. If you need to know how to add files to a bucket, you can check this article

5 10

After that, we can go to the objects tab and see if the files that we have uploaded are in the bucket

6 10 1024x378 1

As you can see in the above screenshot, it now lists the old and new versions of files that we have uploaded and you can see that the same file now has 2 different version IDs. The version ID of the old files are showing as “null” because we have enabled versioning of this bucket when the old files are already there in the bucket.

If you need to delete a file, you can see the version id of the file that you are going to delete in the delete window

7 10

 

The post What is Versioning and how to use it in AWS S3 bucket appeared first on The Linux Juggernaut.

AWS Cloud/Virtulization LinuxNix