S3 storage cost grows every month and nobody knows what's in the buckets. How do you get it under control?

BeginnerScenarioCost
Answer

Situation read → Data is never deleted, old versions pile up in versioned buckets, and nothing moves to cheaper storage classes.

What I'd do →

  1. Use S3 Storage Lens to see the biggest buckets, growth, and non-current version bytes.
  2. Add lifecycle rules: transition and expire based on the data's purpose.
{
  "Rules": [{
    "ID": "logs-tiering",
    "Status": "Enabled",
    "Filter": { "Prefix": "logs/" },
    "Transitions": [{ "Days": 30, "StorageClass": "STANDARD_IA" },
                    { "Days": 90, "StorageClass": "GLACIER_IR" }],
    "Expiration": { "Days": 365 },
    "NoncurrentVersionExpiration": { "NoncurrentDays": 30 },
    "AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 7 }
  }]
}
  1. Use Intelligent-Tiering where access patterns are unknown.
  2. Clean up incomplete multipart uploads; they're invisible in the console but billed.

Why → Lifecycle rules make cleanup automatic and permanent instead of a one-off.

Interview tip → Mention non-current versions and incomplete multipart uploads; they're the hidden storage.

All Real-World Interview questions Roadmap: Interview readiness

More on Cost