Bucket Lifecycle Policy (GCP)
CostLens flags Cloud Storage buckets holding significant data with no lifecycle rule or Autoclass to tier cold objects to cheaper storage classes.
CostLens flags Cloud Storage buckets with no lifecycle rule or Autoclass. Without lifecycle management, rarely-accessed objects keep paying the Standard rate. Auto-tiering cold data to Nearline / Coldline / Archive — or simply enabling Autoclass — commonly cuts ~30% off storage cost.
How it works
Buckets are enumerated
CostLens lists buckets via the Cloud Storage JSON API and checks each bucket's lifecycle rules and autoclass setting.
Size is read from Monitoring
The storage.googleapis.com/storage/total_bytes metric gives each bucket's size; only buckets over ~50 GB are considered.
Savings are estimated
Priced as size × Standard per-GB rate × a conservative ~30% tiering savings rate (mirrors the AWS S3 Intelligent-Tiering model).
What to do
- Enable Autoclass on the bucket (the simplest option — Google moves objects between classes automatically based on access), or
- Add a lifecycle rule to transition objects to Nearline/Coldline/Archive after N days without access.
Severity levels
| Severity | Estimated monthly savings |
|---|---|
| critical | >$500 |
| high | $100–$500 |
| medium | $20–$100 |
| low | <$20 |
Required permissions
- Detect: Storage read (
roles/storage.buckets.list/ viewer) and Monitoring read (roles/monitoring.viewer) — beyond the default GCP Accounts roles.
Grant storage + monitoring read to enable this check
The default CostLens roles cover billing and recommendations. To surface bucket-lifecycle findings, also grant the service account Storage Object Viewer / bucket list and Monitoring Viewer. Without them this check simply produces nothing — it never blocks the rest of your analysis.
Limitations
- The savings figure is an estimate — actual savings depend on how much of the data is genuinely cold.
- Buckets below the size threshold, or with lifecycle/Autoclass already enabled, are not flagged.
- This check is advisory — the lifecycle rule or Autoclass is enabled in the Cloud Console.