Why it matters
Lifecycle rules that move everything to Standard-IA after a fixed number of days are common, and they backfire on data that is still in use.How nOps finds it
nOps reads the last 30 days of S3 billing. A bucket is flagged when it has at least $5 of Standard-IA storage, and its Standard-IA storage plus retrieval and early-delete fees exceed what the same data would cost in S3 Standard by at least $25 a month. The Standard cost uses the public price ratio between Standard and Standard-IA in the region. The saving is that difference.Before you start
Permission to update lifecycle rules (s3:GetLifecycleConfiguration, s3:PutLifecycleConfiguration).
How to implement
- Find the rule that transitions data to
STANDARD_IA:aws s3api get-bucket-lifecycle-configuration --bucket BUCKET. - Remove that transition, or change it to
INTELLIGENT_TIERING, which has no retrieval fees. - Write back the full edited configuration with
put-bucket-lifecycle-configuration, since it replaces every rule. - Optionally copy frequently read objects back to Standard.
- Update Terraform or CloudFormation with the same change.
Risks and considerations
- Objects already in Standard-IA stay there unless you copy them back. Copying them early can itself trigger early-delete fees.
- To roll back, restore the original lifecycle rule.