- Lab
- A Cloud Guru
Managing Data in S3 with Versioning and Lifecycle Rules
In this hands-on lab, we'll start with enabling versioning in an S3 bucket, then we will configure the lifecycle rules to automatically transition objects to lower-cost storage classes, and finally, we will change the image files to reduced redundancy storage as the organization has means to recreate them if they are lost. Understanding and utilizing these S3 features are at the core of S3 data management. Common use cases include recovery from accidental deletions, and lifecycle policies allow for automated migration to [lower cost storage classes](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) when appropriate. Good luck, and enjoy the lab!
Path Info
Table of Contents
-
Challenge
Enable Versioning on the Provided S3 Bucket
- Navigate to S3.
- Open the lab-provided S3 bucket.
- Click the Properties tab.
- Under Bucket Versioning click Edit, and Enable.
- Click Save changes.
-
Challenge
Assign a Lifecycle Rule to Objects in the Logs Folder
- In the Management tab of the bucket, click Create lifecycle rule.
- Enter a name for the rule (e.g., "log-rule").
- For Prefix, enter "Logs".
- Under Lifecycle rule actions, select Move current versions of objects between storage classes.
- Under Transition current versions of objects between storage classes, set the following values:
- Storage class transitions: Standard-IA
- Days after object creation: 90
- Click Create rule.
-
Challenge
Assign a Lifecycle Rule to Objects in the Images Folder
- Back in the Management tab, click Create lifecycle rule again.
- Enter a name for the rule (e.g., "image-rule").
- For the Prefix, enter "Images".
- Under Lifecycle rule actions, select Move current versions of objects between storage classes.
- Under Transition current versions of objects between storage classes, set the following values:
- Storage class transitions: One Zone-IA
- Days after object creation: 30
- Click Create rule.
-
Challenge
Add a Lifecycle Rule to Move the Older Log File to Glacier after 180 Days
- In the S3 bucket
Logs/
folder and add a tag to the most recent log file. - Under Lifecycle rule actions, select Transition current versions of objects between storage classes.
- Under Move current versions of objects between storage classes, set the following values:
- Storage class transitions: Glacier Flexible Retrieval (formerly Glacier)
- Days after object creation: 180
Note: You will be asked if you understand that the lifecycle rule will increase the one-time lifecycle request cost if it transitions small objects.
- Click Create rule.
- In the S3 bucket
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.