Easy1 markMultiple Choice
Domain 4.4: Managing storage and database solutionsCloud StorageLifecycle ManagementCost OptimizationAutomation

GCP ACE · Question 37 · Domain 4.4: Managing storage and database solutions

Your application generates daily log files that are stored in a Cloud Storage Standard bucket. These logs are frequently accessed for the first 30 days. After 30 days, they are rarely accessed but must be kept for 1 year for compliance, after which they can be deleted.

What is the MOST automated and cost-effective way to manage these files?

Answer options:

A.

Write a Cloud Function that runs daily, checks the age of each file, and uses the gsutil command to move older files to a Coldline bucket.

B.

Configure an Object Lifecycle Management policy on the bucket to transition objects to Coldline storage after 30 days, and delete them after 365 days.

C.

Manually change the storage class of the bucket to Coldline at the end of every month.

D.

Use Cloud Scheduler to trigger a Dataflow job monthly to compress and move the logs to Archive storage.

How to approach this question

Identify the native Cloud Storage feature designed specifically for automating data retention and tiering rules.

Full Answer

B.Configure an Object Lifecycle Management policy on the bucket to transition objects to Coldline storage after 30 days, and delete them after 365 days.✓ Correct
Cloud Storage Object Lifecycle Management allows you to define rules that automatically perform actions on objects in a bucket based on conditions like age. In this scenario, you can create a rule to automatically transition objects from Standard to Coldline (or Archive) storage when they reach 30 days old, and another rule to delete them when they reach 365 days old. This is fully managed, requires no custom code, and optimizes costs automatically.

Common mistakes

Choosing to write a custom script (Cloud Function/cron), which reinvents the wheel and adds operational overhead.

Practice the full GCP Associate Cloud Engineer Practice Exam 6

50 questions · hints · full answers · grading

More questions from this exam