Guided architecture tour · 6–8 min
Give old files a cleanup plan — S3 Lifecycle
Plan what happens to old log files as they age.
This tour teaches architecture decisions. Its services are not provisioned in the emulator.
Your goal
Plan what happens to old log files as they age.
Why this matters
Logs help diagnose problems, but they do not all need the same storage forever. You will choose a rule’s scope, separate archiving from deletion, and check it before use.
Words you will use
A lifecycle rule acts on files as they age. A transition changes storage class. Expiration schedules deletion.
How to proceed
Read each situation and choose an answer. The lesson explains the result. Try again if needed, then continue through all three decisions and finish the tour.
1. Choose the right files
Your bucket holds both logs and family photos. Only logs have a cleanup policy. Choose a way to apply the rule to the intended files.
What should the rule match?
A logs/ prefix or a tag used for those logs.
A prefix is the start of an object name, like a folder path. Tags are labels. Match the intended group so a log rule does not accidentally affect photos.
The rule targets only the selected logs.
Filter: Prefix=logs/2. Keep, archive, or delete
Old logs must remain available for a later review, even if they are rarely read. You are considering a storage class with slower retrieval. Choose the right kind of action.
Which action keeps the files?
Transition them to a suitable storage class.
A transition changes how files are stored; expiration deletes them. Compare retrieval speed, fees, and storage rules with your needs before choosing a class.
The plan keeps required logs instead of deleting them.
Age rule → transition to a class that fits retrieval needs3. Check the rule first
You are about to turn on a cleanup rule. Some old files may already meet its age condition. Choose a sensible final check.
What should you review?
Which files match, retention needs, and storage-class rules.
Retention means how long you must keep data. A rule can affect existing files, so review its filter and actions before enabling it. A backup plan is useful before destructive changes.
You understand the affected files before applying the policy.
Review matches → check retention → test the policy → enablePractice, then check your understanding
In the interactive tour, make each decision before seeing the outcome. Wrong answers receive coaching, and replay gives you a fresh attempt without duplicating earned XP.
Read the official AWS documentation for service behavior and production details.