GCP Associate Cloud Engineer Practice Question 14: Lifecycle Noncurrent Versions
Google Cloud Associate Cloud Engineer · Test 2 · question 4 of 10
A bucket has Object Versioning enabled so that users can recover overwritten files. Storage costs are growing because old versions accumulate forever. The company only needs to recover a file for 30 days after it has been overwritten or deleted, and live objects must never be removed.
What should you configure?
Show answer and explanation
Answer:
Lifecycle rules can target noncurrent (archived) versions specifically. A rule with the Delete action, the condition isLive: false (or the days-since-noncurrent-time condition), and a 30 day threshold removes only versions that stopped being the live version at least 30 days ago. Live objects are untouched.
Option A deletes any object whose age reaches 30 days, including live ones, which violates the requirement. Option B is a retention policy, which does the opposite: it prevents deletion or overwrite until objects reach the specified age. Option D reduces the price per GB but keeps every version indefinitely, so costs still grow.
Reference: Object Lifecycle Management