Google Cloud Associate Cloud Engineer — Question 230
You need to migrate invoice documents stored on-premises to Cloud Storage. The documents have the following storage requirements:
• Documents must be kept for five years.
• Up to five revisions of the same invoice document must be stored, to allow for corrections.
• Documents older than 365 days should be moved to lower cost storage tiers.
You want to follow Google-recommended practices to minimize your operational and development costs. What should you do?
Answer options
- A. Enable retention policies on the bucket, and use Cloud Scheduler to invoke a Cloud Function to move or delete your documents based on their metadata.
- B. Enable retention policies on the bucket, use lifecycle rules to change the storage classes of the objects, set the number of versions, and delete old files.
- C. Enable object versioning on the bucket, and use Cloud Scheduler to invoke a Cloud Functions instance to move or delete your documents based on their metadata.
- D. Enable object versioning on the bucket, use lifecycle conditions to change the storage class of the objects, set the number of versions, and delete old files.
Correct answer: D
Explanation
Option D is correct because it allows for the management of document versions while also utilizing lifecycle conditions to optimize storage costs by changing classes based on age. Option A fails to address the need for versioning, while option B does not mention object versioning, which is crucial for maintaining multiple revisions. Option C lacks lifecycle management for storage class changes, which is necessary for cost efficiency.