A property-management company stores raw inspection files in a versioned Amazon S3 bucket. Current versions must be deleted one year after they are created. Older versions that were overwritten or replaced should be removed after 30 days, so the bucket does not keep growing.
The bucket must stay versioned, because the company restores accidentally overwritten files within those 30 days.
Which configuration meets these requirements?
Choose one answer.
AA. Turn off versioning on the bucket, so that overwritten objects are not kept and the bucket stops growing.
BB. Add a lifecycle rule that moves current versions to S3 Glacier Deep Archive after 365 days, and keep every noncurrent version forever.
CC. Add a lifecycle rule that expires current versions after 365 days, and another that expires noncurrent versions after 30 days.
DD. Turn on S3 Object Lock in compliance mode for all objects, so that the files are kept for the retention period and then removed automatically.
Show the answer and explanation
Answer: C
A. Wrong: Turning off versioning removes the 30-day restore window that the company needs. The option fails the restore requirement.
B. Wrong: Moving objects to an archive class keeps them, so the bucket still grows and nothing is deleted. The option does not meet the deletion requirement.
C. Right: Correct. The current-version rule deletes files one year after creation, and the noncurrent-version rule removes overwritten copies after 30 days. The bucket stays versioned, so recent overwrites can still be restored. Learn more: Examples of S3 Lifecycle configurations (opens in a new tab)
D. Wrong: Object Lock prevents deletion until the retention period ends, and it does not remove objects automatically. The option blocks the cleanup and does not match the requirement.
Explanation
S3 lifecycle rules can expire current versions and noncurrent versions on different timelines. Expiring current versions after one year and noncurrent versions after 30 days deletes the old data while keeping the bucket versioned for short-term restores. Turning versioning off, archiving everything or using Object Lock does not meet the combined requirement.
Want more on Data lifecycle, versioning and TTL? The 5 full-length practice sets have 6 more Data lifecycle, versioning and TTL questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →