Ends in
00
days
00
hrs
00
mins
00
secs
SHOP NOW

💝 Valentine's Sale! Get 30% OFF Any Reviewer. Use coupon code: PASSION-4-CLOUD & 10% OFF Store Credits/Gift Cards

Guided Lab: Protecting Data on Amazon S3 Against Accidental Delete and Overwrite Using S3 Versioning

Description

Accidental deletions in Amazon S3 can happen more easily than you might think. A misplaced click, an erroneous script, or a misunderstanding in a team can lead to the loss of critical data. This reality underscores the importance of having protective measures in place.

S3 Versioning is a feature in Amazon S3 that keeps track of all versions of an object. It’s like having a history of every change made to each file in your S3 bucket. Whenever you update or delete a file, S3 Versioning retains the old version, allowing you to access and restore it if needed. This is particularly useful for data recovery and backup, as it guards against accidental deletions and overwrites.

This lab will guide you through the steps to effectively implement these safeguards, providing a safety net for your data in AWS.

Prerequisites

To guarantee a successful completion of this lab, you must possess prior experience creating Amazon S3 buckets and have a solid understanding of their core components. If you believe that your knowledge in this regard is lacking, we strongly advise you to consider taking the following to acquire the required proficiency:

  • Creating an Amazon S3 bucket

Objectives

In this lab, you will:

  • Learn how to enable S3 Versioning to prevent overwriting of objects
  • Learn how to restore previous versions

Lab Steps

Creating an Amazon S3 bucket

1. Create an S3 bucket using the following configurations:

  • Add a Bucket Name:
    Note: Provide a unique and descriptive name for your bucket. Remember that bucket names must be globally unique across all AWS accounts. Try a different combination if you receive an error message regarding your selected name. After that, set the AWS Region to N. Virginia to place the bucket to be created there.
  • Next, in the Bucket Versioning section, make sure you Enable Bucket Versioning.
  • Click Create a bucket to proceed in creating the S3 bucket.
Restoring a file from an accidental overwrite

1. Create a text file on your computer containing the words List of Filipino Dishes and save it. Upload the file to the bucket. Select the Objects tab. Then, within the Objects section, choose Upload.

2. After finishing the file upload process, view the object in the S3 bucket.

3. On your local computer, edit the same file that you created earlier. Change or add a text, then save it. Upload the updated file to S3 Bucket by repeating Step 1.

4. To view all versions of the objects stored in the bucket, select the “Versions” option. The console will display a list of unique version IDs for each object version, along with the date and time it was created and other relevant properties.

5. To confirm that the change has been saved, open the “List of Filipino Dishes” object, and the word “Halo-Halo” must be displayed.

6. In case you accidentally make changes to the file, restore the previous version of the file by:

  • Going to the Versions page of the List of Filipino Dishes object, select the check box next to the Version ID for the versions that you want to retrieve.
  • Choose Actions, choose Download, and save the object.
Restoring a file from an accidental deletion

1. To simulate an accidental deletion, you need to have a deleted object first. Delete the “List of Filipino Dishes” object.

2. Open the bucket of the deleted object and enable the Show Versions.

Select the previous version of the object. Note: Don’t select the Type with the Delete marker.

Then, click the Download button.

3. That’s it! You’ve successfully restored the desired version of your file

Skip to content