CLF-C02 Practice Question 77: Object Lifecycle Rules
AWS Certified Cloud Practitioner (CLF-C02) · Test 8 · question 7 of 10
An application writes log files to an Amazon S3 bucket. The logs are read often during their first 30 days, rarely after that, and must be deleted once they are one year old. The team wants S3 to handle this automatically without writing any code. What should the team configure?
Show answer and explanation
Answer:
An S3 Lifecycle configuration is a set of rules that S3 applies to a group of objects. A transition action moves objects to another storage class after a set time, for example to S3 Standard-IA 30 days after creation. An expiration action deletes objects on your behalf when they expire, for example after 365 days. Together they handle this whole log retention policy with no code, and the rules apply to existing objects as well as new ones.
Option A keeps *every* version of an object. That preserves data rather than deleting it on a schedule, and it would increase storage. Option B copies objects to a bucket in another Region, which doubles storage instead of reducing it or deleting old logs. Option D moves objects between access tiers automatically based on how they are accessed, but Intelligent-Tiering on its own never deletes anything. The one-year deletion requirement still needs an expiration rule.
Reference: Managing the lifecycle of objects