We configured an S3 lifecycle policy to transition ERP application logs to Glacier after 90 days, but logs are staying in Standard storage and our costs are increasing.
Our lifecycle policy:
{
"Rules": [{
"Id": "archive-erp-logs",
"Status": "Enabled",
"Transitions": [{
"Days": 90,
"StorageClass": "GLACIER"
}]
}]
}
The bucket has logs organized by date like logs/2024/11/15/app.log. We applied the policy three months ago, but checking S3 storage analytics shows no objects have transitioned. The policy status is “Enabled” in the console. Are there specific requirements for lifecycle transitions that we’re missing? The logs are definitely older than 90 days.
Check the object size. S3 lifecycle transitions to Glacier have a minimum object size requirement. Objects smaller than 128 KB won’t transition automatically. If your individual log files are small, you might need to aggregate them first or use S3 Intelligent-Tiering instead.
The log files are typically 500KB-2MB each, so size shouldn’t be the issue. I didn’t realize a filter was required - I thought omitting it would apply to all objects. Let me add the prefix filter and see if that helps. Should I use Prefix or Filter in the JSON?
For ERP logs, make sure you’re not using Glacier if you need quick retrieval for compliance. Glacier retrievals take hours and cost extra. Consider Glacier Instant Retrieval or Intelligent-Tiering if you occasionally need to access old logs. Also check if your objects have legal holds or object locks that prevent lifecycle transitions.