Why it matters
A lifecycle rule that applies to every object in a bucket often moves millions of tiny files, each paying a transition fee.How nOps finds it
nOps reads 50 days of S3 transition, overhead and storage charges for each bucket and target class. A class is flagged when transitions ran in the last 3 days, started at least 37 days ago, and the data in the class has not grown more than 25% in 30 days. For the last 7 days, nOps compares the transition charge plus per-object overhead with what the class saves on storage, using public price ratios applied to your billed cost. The saving is the sum of the losses for each losing class, scaled to a month, and must be at least $20 a month. Intelligent-Tiering transitions are not included.Before you start
Permission to update lifecycle rules (s3:GetLifecycleConfiguration, s3:PutLifecycleConfiguration).
How to implement
- Find the rule that transitions data to the class:
aws s3api get-bucket-lifecycle-configuration --bucket BUCKET. - If objects are small, add an object size filter so only larger objects move, for example
ObjectSizeGreaterThanof 131072 bytes (128 KB). - If objects are deleted soon after they move, remove the transition, or transition only data you keep for many months.
- Write back the full edited configuration with
put-bucket-lifecycle-configuration, since it replaces every rule. - Update Terraform or CloudFormation with the same change.
Risks and considerations
- The transition charge stops at once. Overhead on objects already moved stops only as they expire or are removed.
- Check that no retention or compliance requirement depends on the archive class before changing the rule.
- To roll back, restore the original lifecycle rule.
FAQs
Why do small objects lose money?
Why do small objects lose money?
Each transition is charged per object, and archive classes add metadata per object, while IA and Glacier Instant Retrieval bill objects under 128 KB as 128 KB.