S3 Lifecycle Policies That Will Actually Save You Money on Your Next AWS Bill

S3 storage costs are easy to ignore until you’re looking at a bill that’s grown quietly for months. As someone who has done the uncomfortable exercise of explaining a $3,000 S3 bill to a manager and then spent an afternoon setting up lifecycle policies that reduced it by 60%, I learned that the configuration takes about an hour and the savings are immediate. Today I’ll share the rules that actually pay off.

AWS S3 lifecycle policy configuration showing storage class transitions

How Lifecycle Policies Work

Lifecycle policies are rules you attach to a bucket or prefix that transition objects to cheaper storage classes or expire them after a specified number of days. Transitions happen automatically — you define the rules once and S3 handles the rest. There’s no cost for the policy itself; you pay for storage at the destination storage class rate.

S3 Storage Classes: The Relevant Ones

S3 Standard: $0.023/GB/month. Retrieval is free. Use for data you access frequently.

S3 Standard-IA (Infrequent Access): $0.0125/GB/month. Retrieval fee of $0.01/GB. Minimum 30-day storage commitment. Use for data you access less than once per month. The retrieval fee means this costs more than Standard if you’re accessing the data frequently — calculate before transitioning.

S3 Glacier Instant Retrieval: $0.004/GB/month. Retrieval in milliseconds but $0.03/GB retrieval cost. Minimum 90-day storage. Use for archive data you occasionally need to retrieve quickly.

S3 Glacier Deep Archive: $0.00099/GB/month. Retrieval takes up to 12 hours. The cheapest option. Use for compliance archives and data you’re keeping because you have to, not because you’ll need it.

The Lifecycle Rules That Pay Off

Application logs: Logs are accessed frequently for the first few days and rarely after that. A two-tier policy works well:

{
  "Rules": [{
    "ID": "application-logs-lifecycle",
    "Status": "Enabled",
    "Filter": {"Prefix": "logs/"},
    "Transitions": [
      {"Days": 30, "StorageClass": "STANDARD_IA"},
      {"Days": 90, "StorageClass": "GLACIER_IR"}
    ],
    "Expiration": {"Days": 365}
  }]
}

Logs transition to Infrequent Access after 30 days, to Glacier Instant Retrieval after 90 days, and delete at one year. Adjust the expiration based on your retention requirements.

Build artifacts and CI outputs: These have almost no value after a deployment is confirmed stable:

{
  "Rules": [{
    "ID": "build-artifacts-lifecycle",
    "Status": "Enabled",
    "Filter": {"Prefix": "artifacts/"},
    "Expiration": {"Days": 30}
  }]
}

Noncurrent Versions

If versioning is enabled on your bucket — and it should be for important data — old versions of objects accumulate silently. A lifecycle rule for noncurrent versions is essential. Without this, every object version you’ve ever created is sitting in S3 at Standard rates. That’s what makes this rule endearing to anyone who has enabled versioning and then checked their bill six months later — the noncurrent version cost is often larger than the current version cost.

{
  "NoncurrentVersionTransitions": [
    {"NoncurrentDays": 30, "StorageClass": "STANDARD_IA"},
    {"NoncurrentDays": 90, "StorageClass": "GLACIER_FLEXIBLE_RETRIEVAL"}
  ],
  "NoncurrentVersionExpiration": {"NoncurrentDays": 365}
}

Before You Apply Rules

Use S3 Storage Lens to understand your actual access patterns before setting transition days. Probably should have led with this, honestly — if objects in a specific prefix are accessed regularly after 30 days, transitioning to IA at 30 days will cost you retrieval fees that offset the storage savings. Storage Lens shows last-accessed dates and request counts per prefix. Spend 20 minutes reviewing it before writing lifecycle rules for production data.

Jason Michael

Jason Michael

Author & Expert

Jason covers aviation technology and flight systems for FlightTechTrends. With a background in aerospace engineering and over 15 years following the aviation industry, he breaks down complex avionics, fly-by-wire systems, and emerging aircraft technology for pilots and enthusiasts. Private pilot certificate holder (ASEL) based in the Pacific Northwest.

48 Articles
View All Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Stay in the loop

Get the latest stigcloud updates delivered to your inbox.