Description

Ensure that Cloud Storage buckets have Object Lifecycle Management configured with at least one valid rule that automatically transitions objects to lower-cost storage classes or deletes them once they meet defined age, version, or condition criteria.

Rationale

Without lifecycle management, objects accumulate indefinitely in a bucket's default storage class, increasing storage costs unnecessarily and retaining data (including outdated or sensitive data) longer than may be required by policy. A valid lifecycle rule enforces consistent data retention and cost-optimization behavior automatically, without relying on manual cleanup processes.

Impact

  • Reduces storage costs by automatically transitioning aged objects to cheaper storage classes

  • Reduces the risk of retaining stale or unnecessary data indefinitely

  • Enforces consistent, automated data lifecycle handling instead of manual processes

  • Requires careful rule design to avoid unintended deletion of data still in use

Default Value

By default, newly created Cloud Storage buckets have no lifecycle management rules configured, and objects are retained indefinitely until manually deleted.

Pre-Requisites

  • IAM permissions to view and edit Cloud Storage bucket configuration (e.g., Storage Admin)

  • A documented data retention and storage-class transition policy for the bucket's contents

Test Plan

  1. Sign in to the Google Cloud Console at https://console.cloud.google.com.

  2. Select the relevant project.

  3. Navigate to Cloud Storage > Buckets and select the bucket to review.

  4. Open the Lifecycle tab.

  5. Verify that at least one lifecycle rule is listed and enabled.

  6. Review the rule's conditions (age, storage class, live/archived state, etc.) and action (Set storage class or Delete) to confirm it matches the intended data policy.

  7. If no lifecycle rule exists, follow the implementation steps.

Implementation Steps

  1. Sign in to the Google Cloud Console at https://console.cloud.google.com.

  2. Select the relevant project.

  3. Navigate to Cloud Storage > Buckets and select the bucket to update.

  4. Open the Lifecycle tab and select Add a rule.

  5. Select the desired action, such as Set storage class to Nearline/Coldline/Archive or Delete object.

  6. Define the conditions that trigger the action, such as Age in days, Number of newer versions, or Live/archived state.

  7. Click Create to save the rule.

  8. Repeat for additional rules as needed, and confirm the rules appear as Enabled in the Lifecycle tab.

Backout Plan

  1. Sign in to the Google Cloud Console at https://console.cloud.google.com.

  2. Select the relevant project.

  3. Navigate to Cloud Storage > Buckets and select the affected bucket.

  4. Open the Lifecycle tab.

  5. Select the rule to remove and choose Delete rule.

  6. Confirm the deletion.

Reference