An operations engineer manages a Google Cloud Storage bucket named finance-records that has Object Versioning enabled. To comply with corporate retention policies while controlling costs, noncurrent object versions must be transitioned to Archive storage 30 days after becoming noncurrent, and permanently deleted 90 days after becoming noncurrent. Current object versions must remain untouched in Standard storage. Which configuration strategy correctly implements this lifecycle policy?
- Define an Object Lifecycle Management policy with two rules: one with action SetStorageClass to ARCHIVE using the daysSinceNoncurrentTime condition set to 30, and another with action Delete using the daysSinceNoncurrentTime condition set to 90.Answer
- BDefine an Object Lifecycle Management policy with two rules using the age condition set to 30 days for SetStorageClass to ARCHIVE and 90 days for Delete.
- CSchedule a daily gcloud storage objects update job via Cloud Scheduler to modify storage classes to ARCHIVE for objects older than 30 days, followed by a gcloud storage rm command at 90 days.
- DEnable Uniform Bucket-Level Access on the bucket and attach per-object access control list (ACL) metadata to tag noncurrent versions for automatic storage class transition.
Answer
The lifecycle policy must be configured using the daysSinceNoncurrentTime condition with SetStorageClass to ARCHIVE at 30 days and Delete at 90 days.
Configuring an Object Lifecycle Management rule using daysSinceNoncurrentTime explicitly targets noncurrent object versions created when Object Versioning is active. Setting SetStorageClass to ARCHIVE at 30 days and Delete at 90 days fulfills the exact retention policy without affecting current versions.
Step-by-Step Solution
Key Concept
Cloud Storage Object Lifecycle Management for Noncurrent Versions
Estimated Time:2m 0s