A company is using Cloud Storage to store sensitive data. They want to enforce that objects are automatically deleted after 90 days. Which configuration should they use?
Lifecycle rules can be set to delete objects when they reach a certain age.
Why this answer
Object Lifecycle Management allows you to set rules that automatically perform actions on objects after a specified number of days. By configuring a rule with a Delete action set to trigger after 90 days, objects in the bucket will be automatically removed, meeting the requirement without manual intervention.
Exam trap
Google Cloud often tests the distinction between retention policies (which protect data from deletion) and lifecycle rules (which automate deletion), leading candidates to confuse a retention policy with a deletion policy.
How to eliminate wrong answers
Option B is wrong because a retention policy on a bucket prevents objects from being deleted or overwritten until the retention period expires, which is the opposite of automatically deleting objects after 90 days. Option C is wrong because bucket locking with a retention period enforces a write-once-read-many (WORM) policy that prevents object deletion or modification, not automatic deletion. Option D is wrong because enabling object versioning and setting a lifecycle rule to delete noncurrent versions only removes older versions of objects, not the current live objects, and does not guarantee deletion of all objects after 90 days.