DEA-C01 Practice Question 54: S3 Lifecycle Retention Policy
AWS Certified Data Engineer – Associate (DEA-C01) · Test 6 · question 4 of 10
Raw clickstream files land under s3://lake/raw/. Policy says they must stay immediately queryable for 30 days, be retained but rarely read for the following 11 months, and be deleted once they are one year old. The team wants this enforced by the platform rather than by a scheduled job somebody has to maintain.
Which approach implements this policy?
Show answer and explanation
Answer:
S3 Lifecycle is the built-in mechanism for exactly this. A lifecycle configuration is "a set of rules that define actions that Amazon S3 applies to a group of objects", of two kinds: "Transition actions – These actions define when objects transition to another storage class" and "Expiration actions – These actions define when objects expire. Amazon S3 deletes expired objects on your behalf." The documented example is this very shape: an initial transition to a cheaper class, then an expiration action once the objects are no longer needed. Scoping the rule to the raw/ prefix leaves the rest of the bucket alone, and Amazon S3 applies the rules to existing objects as well as new ones.
Option A rebuilds lifecycle management as code the team must own. It pays LIST, COPY and DELETE request charges, has to be idempotent and paginated, and fails silently the first time a run is missed.
Option B misreads versioning. Noncurrent version expiration removes *previous versions* of objects that have been overwritten or deleted; it does nothing to the current version of a file that was written once and never touched again, so nothing would ever be deleted.
Option D uses Athena as a scheduler and an inventory report as a work queue. Athena cannot delete S3 objects, it queries data, so this needs additional code anyway, and a weekly inventory means the retention boundary is enforced up to a week late.
Reference: Managing the lifecycle of objects