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 →
- Use S3 Storage Lens to see the biggest buckets, growth, and non-current version bytes.
- 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 }
}]
}
- Use Intelligent-Tiering where access patterns are unknown.
- 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.
More on Cost
The AWS bill jumped 40% this month and finance wants an explanation by tomorrow. How do you find out why?BeginnerThe "NAT Gateway – data processed" line is $9,000 a month. How do you bring it down?IntermediateCut EKS compute cost by 40% without hurting reliability. What's your plan?AdvancedDev and test environments run 24/7 but are used only during office hours. How do you cut that cost?BeginnerCloudWatch Logs costs more than the EC2 fleet. What do you do?IntermediateFinance asks you to buy commitments. Savings Plans or Reserved Instances, and how much?Intermediate