Courseiva
Google Cloud Products and ServiceshardMultiple ChoiceObjective-mapped

Cloud Digital Leader Google Cloud Products and Services Practice Question

A DevOps engineer wants to automatically delete a Cloud Storage object after 30 days from creation. The object is stored in a bucket with the 'Standard' storage class. Which approach should the engineer use?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Add a lifecycle rule to delete objects after 30 days

Object Lifecycle Management rules can be configured on a bucket to delete objects based on age (days since creation). The rule sets a condition (e.g., age: 30) and action (Delete). Changing the storage class or using bucket lock does not delete objects. Object versioning is for keeping multiple versions.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Set a retention policy on the bucket with a 30-day retention period

    Why it's wrong here

    A retention policy on a bucket is designed to prevent deletions and modifications, not to initiate them. Objects under a retention period are locked and cannot be removed by any user, API, or even lifecycle rules until the period expires. Once the 30-day period ends, the policy only removes the restriction; it does not trigger an automatic deletion of the object.

  • Change the storage class to 'Archive' which automatically deletes after 30 days

    Why it's wrong here

    The 'Archive' storage class is intended for long-term archival of data that is rarely accessed, with lower storage cost but higher retrieval fees. It has no built-in scheduling to automatically delete objects after any time period. Changing the storage class only moves the object to a different cost tier; you still need a lifecycle rule to perform an actual deletion after 30 days.

  • Enable object versioning and set a noncurrent time deletion of 30 days

    Why it's wrong here

    Object versioning allows you to keep multiple versions of an object, and a lifecycle rule with a noncurrent time condition deletes only the versions that are not currently live. The live (current) version remains untouched and continues to exist indefinitely. Therefore, this method would never delete the current object itself, only some of its historical versions, so it fails to meet the requirement.

  • Add a lifecycle rule to delete objects after 30 days

    Why this is correct

    A bucket lifecycle rule supports an age-based Delete action, which automatically removes objects after a specified number of days from their creation time. By setting 'age: 30' in the Delete action, Cloud Storage will delete the objects exactly at the 30-day mark during its daily lifecycle evaluation. This is the native, recommended mechanism for automatic object expiration and directly fulfills the requirement.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

One of 829 original GCDL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.