Your app stores files in Standard Storage and only needs access to files created within the last 30 days. You want to automatically reduce storage cost for older objects. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an object lifecycle on the storage bucket to change the storage class to Archive Storage for objects with an age over 30 days..
Why this is the answer
The correct answer is to create an object lifecycle policy. This feature is designed precisely for scenarios where you need to automatically transition objects between storage classes (e.g., from Standard to Archive) or delete them based on age or other conditions. By setting a rule to change the storage class to Archive Storage for objects older than 30 days, you achieve cost reduction for less frequently accessed data without deleting it. The other options are incorrect because: A cron job with a Cloud Function to delete files older than 30 days would delete the data, not just reduce its cost by changing storage class. The requirement is to reduce cost for older objects, not delete them. A retention policy prevents objects from being deleted or modified for a specified period, which is the opposite of what's needed here. It ensures data persists, not that it's cost-optimized or deleted. Object versioning with lifecycle rules to expire non-current versions after 30 days manages multiple versions of an object, not the primary object's storage class or deletion based on its age. It's for managing historical versions, not the current object's lifecycle for cost optimization.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed