S3 Lifecycle Policies That Actually Save Money (and the Ones That Cost More)

Moving data to colder S3 storage classes looks like free money until minimum durations, small objects and transition fees eat the saving. How we design lifecycle rules that pay back.

S3 Lifecycle Policies That Actually Save Money (and the Ones That Cost More)

"Move it to Glacier" is the most common S3 cost advice and one of the most commonly misapplied. Colder storage classes are dramatically cheaper per gigabyte, but they come with minimum storage durations, minimum billable object sizes, per-request transition fees and retrieval charges. Apply a lifecycle rule to the wrong data and the bill goes up. This post is how we decide what to move, when, and what to delete instead.

Start with what you actually store

Before touching a lifecycle rule, get three facts per bucket: total size, object count, and access pattern. Two free tools give you most of it:

The ratio that matters most is average object size. A bucket of large backups and a bucket holding hundreds of millions of tiny JSON files need completely different treatment, even at the same total size.

The rules the price list does not put on the front page

Storage classMinimum storage durationMinimum billable sizeRetrieval
S3 StandardNoneNoneNo fee
S3 Intelligent-TieringNoneSmall objects stay in the frequent tierNo fee
S3 Standard-IA / One Zone-IA30 days128 KBPer-GB fee
S3 Glacier Instant Retrieval90 days128 KBPer-GB fee, milliseconds
S3 Glacier Flexible Retrieval90 days40 KB overhead per objectPer-GB and per-request, minutes to hours
S3 Glacier Deep Archive180 days40 KB overhead per objectPer-GB and per-request, hours

What those columns mean in practice:

AWS changed the lifecycle default in 2024 so that objects smaller than 128 KB are not transitioned unless you explicitly override it. That protects you from the worst cases, but only if you leave the default alone.

The decision tree we use

1. Can it be deleted? Logs past their retention period, build artifacts, temporary exports, old noncurrent versions. Expiration is the only lifecycle action that saves money with no trade-off. Agree retention periods with whoever owns the compliance requirement, write them down, and encode them.

2. Is the access pattern unknown or changing? Use S3 Intelligent-Tiering. It moves objects between frequent, infrequent and archive instant access tiers automatically based on actual access, with no retrieval fees. You pay a small monitoring fee per object, and objects under 128 KB are not monitored or tiered (and not charged the fee). For most data lakes, user uploads and anything with an unpredictable read pattern, it is the right default.

3. Is the access pattern known and predictable? Use explicit transitions. Backups, audit archives and compliance logs are written once, rarely read, and kept for years. They are the classic case for a lifecycle rule into Glacier Instant Retrieval, Flexible Retrieval or Deep Archive, chosen by how fast you would need the data back.

4. Are the objects small? Aggregate before archiving. Batching small files into larger archives (Parquet for analytics data, tar or zip for logs) before they reach a cold class avoids both the per-object overhead and the transition fees.

A lifecycle rule for audit logs

A typical configuration for logs that must be kept seven years, are queried for the first month, and almost never after a quarter:

{
  "Rules": [
    {
      "ID": "audit-logs-retention",
      "Filter": { "Prefix": "audit/" },
      "Status": "Enabled",
      "Transitions": [
        { "Days": 30,  "StorageClass": "STANDARD_IA" },
        { "Days": 90,  "StorageClass": "GLACIER_IR" },
        { "Days": 365, "StorageClass": "DEEP_ARCHIVE" }
      ],
      "Expiration": { "Days": 2555 },
      "NoncurrentVersionExpiration": { "NoncurrentDays": 30 },
      "AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 7 }
    }
  ]
}

Applied with:

aws s3api put-bucket-lifecycle-configuration \
  --bucket example-audit-logs \
  --lifecycle-configuration file://lifecycle.json

Two cautions. put-bucket-lifecycle-configuration replaces the whole configuration, so merge with any existing rules first. And if the bucket uses S3 Object Lock for regulatory retention, the lock wins: expiration cannot delete a locked object version before its retention date, which is what you want, but check that the expiration and retention periods agree so the rule does what its name says.

The hidden storage most buckets carry

Three kinds of data accumulate silently and are often the largest saving available:

None of these needs an access-pattern analysis. They are safe to add to almost every versioned bucket.

Beyond S3: snapshots and volumes

The same thinking applies to block storage, which often costs more than S3 in estates that never cleaned up:

Make it the default, not a project

Lifecycle work done once decays. The durable version is a baseline applied to every new bucket through infrastructure as code: incomplete multipart upload clean-up, noncurrent version expiry, and Intelligent-Tiering as the default storage class unless the owner chooses otherwise. Then an AWS Config rule or Storage Lens check flags buckets without a lifecycle configuration, so exceptions are deliberate.

What this looks like at ccX

Storage lifecycle is one of the six levers in our two-week AWS Cost Optimization Review. We profile your buckets and snapshots by size, object count and access pattern, separate the data that should be deleted from the data that should be tiered, model each lifecycle change including transition fees and minimum durations, and agree retention periods with whoever owns the compliance requirement. Fixed fee, read-only access, never a percentage of savings.

If your S3 bill only ever goes up, book a 30-minute scoping call.

Where to go from here

S3 pricing, minimum durations and lifecycle defaults are set by AWS and change over time. Check the current S3 pricing page and documentation before modelling a large transition.


Sitemap