Google Cloud Professional Cloud Developer — Question 190
You are developing an application that will store and access sensitive unstructured data objects in a Cloud Storage bucket. To comply with regulatory requirements, you need to ensure that all data objects are available for at least 7 years after their initial creation. Objects created more than 3 years ago are accessed very infrequently (less than once a year). You need to configure object storage while ensuring that storage cost is optimized. What should you do? (Choose two.)
Answer options
- A. Set a retention policy on the bucket with a period of 7 years.
- B. Use IAM Conditions to provide access to objects 7 years after the object creation date.
- C. Enable Object Versioning to prevent objects from being accidentally deleted for 7 years after object creation.
- D. Create an object lifecycle policy on the bucket that moves objects from Standard Storage to Archive Storage after 3 years.
- E. Implement a Cloud Function that checks the age of each object in the bucket and moves the objects older than 3 years to a second bucket with the Archive Storage class. Use Cloud Scheduler to trigger the Cloud Function on a daily schedule.
Correct answer: A, D
Explanation
Setting a retention policy on the bucket for 7 years (Option A) ensures compliance with regulatory requirements by preventing deletion of data during this period. Creating an object lifecycle policy to move objects to Archive Storage after 3 years (Option D) optimizes storage costs for infrequently accessed objects. The other options either do not address the retention requirement effectively or increase complexity without reducing costs.