S3 Lifecycle Policy Generator

Most stored data is written once, read for a few weeks, then kept forever on disks that draw power around the clock. Answer a few questions about your data, watch its storage journey in the live diagram, and export a lifecycle policy as Terraform, CloudFormation, or CDK.
Format
IaC flavour
Your data
A few questions
Bucket
Name & scope
Transitions
Colder storage
End of life
Expiration & cleanup
Step 0 of 0

How do you manage your infrastructure?

Why lifecycle policies matter
Storage feels free, but every byte lives on hardware that consumes energy 24/7 — whether the data is read or not. A lifecycle policy moves cooling data to more efficient storage tiers and, most importantly, deletes it when it's no longer needed.
Step 1 of 5
Where your data lives, and when it stops living there

The live diagram renders in the browser.

Small objects don't transition
Objects smaller than 128 KB are not moved to IA or Intelligent-Tiering — the per-object overhead would cost more than it saves.
lifecycle.tf
resource "aws_s3_bucket" "my-app-logs" {
  bucket = "my-app-logs"
}

resource "aws_s3_bucket_lifecycle_configuration" "my-app-logs" {
  bucket = aws_s3_bucket.my-app-logs.id

  rule {
    id     = "sustainable-lifecycle"
    status = "Enabled"

    filter {} # applies to every object in the bucket

    transition {
      days          = 30
      storage_class = "STANDARD_IA"
    }

    transition {
      days          = 90
      storage_class = "GLACIER"
    }

    expiration {
      days = 730
    }

    # Failed multipart uploads keep their parts in storage until aborted.
    abort_incomplete_multipart_upload {
      days_after_initiation = 7
    }
  }
}

33 lines · 2 transitions · deletes after 730 days 🌱