Ensure that your Google Cloud Storage buckets are using lifecycle management rules to manage objects during their lifetime and help saving on Google Cloud Platform (GCP) storage costs. Lifecycle management rules apply actions to current and future objects when they meet user-defined conditions such as downgrading or deleting older objects, in order to help manage costs.
optimisation
Google Cloud Storage service transitions and expires data objects automatically according to the lifecycle management rules that you define at the bucket level. A lifecycle management configuration (i.e. rule or set of rules) lets you automatically delete objects at the end of their lifecycle and migrate objects to a cold storage class in order to optimize your data for storage costs. For example, you can define a Cloud Storage lifecycle management rule to save costs and achieve compliance (with the law, with your organization standards, or your business requirements) by changing the storage class of your objects to Nearline Storage if their age is greater than 365 days (1 year) and their current storage class is Standard Storage, Multi-Regional Storage, or Durable Reduced Availability (DRA) Storage. Nearline Storage class is best suited for backups and data accessed less than once a month. You can also configure a rule that changes the storage class of the objects to Coldline Storage if their age is greater than 1095 days (3 years) and their current storage class is Nearline Storage. Coldline Storage is mostly used for disaster recovery and data accessed less than once a quarter.
Audit
To determine if your Google Cloud Storage objects are using lifecycle management configurations, perform the following actions:
Remediation / Resolution
To enable object lifecycle management for your Google Cloud Storage buckets, define a lifecycle rule to transition your data to the appropriate storage class or expire/delete it at the end of the specified lifecycle. To create and configure a lifecycle rule, perform the following actions:
Note: As example, this conformity rule will demonstrate how to downgrade the storage class of a bucket's objects older than 365 days to Nearline Storage, where the current storage class is Standard Storage, Multi-Regional Storage, and Durable Reduced Availability (DRA) Storage. Nearline Storage is a low-cost, highly durable storage class designed for storing infrequently accessed data. This class is most suitable for backups and data accessed once a month for analysis.References
- Google Cloud Platform (GCP) Documentation
- Storage classes
- Object Lifecycle Management
- Managing object lifecycles
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
Unlock the Remediation Steps
Free 30-day Trial
Automatically audit your configurations with Conformity
and gain access to our cloud security platform.
You are auditing:
Enable Lifecycle Management for Cloud Storage Objects
Risk Level: Medium