Your S3 lifecycle rule is enabled, matching, and doing nothing

2026-12-02来源 dev.toEnglish

Someone notices the bucket is mostly thumbnails, writes a lifecycle rule to push them to Standard-IA after thirty days, enables it, and moves on. A quarter later the storage line has not moved. The rule is still there. It is still enabled. The prefix still matches.

It is working exactly as designed, and transitioning nothing.

The 128 KB floor

By default, S3 Lifecycle does not transition objects smaller than 128 KB. That is the whole explanation. If your objects are 40 KB thumbnails, the rule matches them, evaluates them, and leaves them in Standard forever.

{ "Rules": [{ "ID": "thumbs-to-ia", "Status": "Enabled", "Filter": {"Prefix": "thumbs/"}, "Transitions": [{"Days": 30, "StorageClass": "STANDARD_IA"}] }] } 

Nothing above is wrong. The prefix is right — every thumbnail is under thumbs/. The rule ID is fine; hyphens are legal and IDs are free-form labels. The status is Enabled. People burn a long time checking those three things, because they are the things a rule can plausibly get wrong, and none of them is the problem here.

Forcing it is worse than leaving it

The obvious next move is to override the floor with an explicit object-size filter and push the thumbnails into STANDARD_IA anyway. Do the arithmetic before you do that.

Standard-IA bills a minimum billable object size of 128 KB. A 40 KB thumbnail moved into IA is charged as 128 KB — more than three times its actual size. The per-gigabyte rate is lower, but you are now paying that lower rate on roughly 3.2× the bytes, plus a per-GB retrieval charge every time something reads it, plus a 30-day minimum storage duration. For small, occasionally-read objects you have added cost and latency and called it an optimisation.

The same minimum-duration trap applies across the archive classes: each infrequent-access and archive tier bills a minimum storage duration, so objects deleted or re-transitioned before that window still bill for the full period.

What to do instead

  • Check the object size distribution before writing the rule. If the median object is under 128 KB, lifecycle transitions are not your lever.
  • For many small objects, aggregate rather than tier. Packing thumbnails into larger objects changes the economics; moving them between classes does not.
  • Where the access pattern is genuinely unknown, S3 Intelligent-Tiering moves objects between access tiers automatically with no retrieval fees — but it is a monitoring-fee model, so it also wants objects big enough to be worth monitoring.
  • Match the class to the read pattern, not the age. Standard-IA and One Zone-IA are cheaper to store and charge per gigabyte retrieved. Glacier Instant Retrieval suits rarely-read data that still needs millisecond access. Flexible Retrieval and Deep Archive are for data you can wait for.

The general shape of this mistake

Lifecycle rules look declarative, so they get treated as if enabling one is the same as it working. It is not. A rule can be valid, enabled, correctly scoped, and still be a no-op because of a default threshold nobody read.

The check is cheap: list a sample of the objects the rule targets, look at their sizes, and compare with 128 KB. If you are under it, the rule will sit there quietly matching objects and never moving one, and your storage graph will stay exactly as flat as it was the day you wrote it.

Documented in Transitioning objects using Amazon S3 Lifecycle.

I write SAA-C03 practice scenarios for a living. This exact case is one of ten free diagnostic questions, no sign-up: https://gyanagent.in/exams/saa-c03

原文:https://www.a8q9.cn/en/article/your-s3-lifecycle-rule-is-enabled-matching-and-doing-nothing-06fe93.html

相关文章