Why This Matters
Most S3 data follows the 80/20 rule - 80% of stored data is accessed infrequently after 90 days. Without lifecycle policies, you're paying premium Standard S3 pricing for cold data that could be stored much cheaper.
Storage class pricing comparison:
- Standard S3: ~$0.023/GB/month
- Standard IA: ~$0.0125/GB/month (45% savings)
- Glacier: ~$0.004/GB/month (83% savings)
How to Identify Lifecycle Opportunities
AWS Saver flags buckets for lifecycle optimization when they meet these criteria:
- Bucket size above 1GB (minimum threshold for meaningful savings)
- Objects aged over 90 days present in Standard storage
- No existing lifecycle configuration or incomplete policies
- Estimated monthly savings above $5 (focuses on impactful optimizations)
How to Fix S3 Lifecycle Issues
Step 1: Check which buckets lack lifecycle policies
aws s3api list-buckets --query 'Buckets[].Name' | while read bucket; do
aws s3api get-bucket-lifecycle-configuration --bucket $bucket 2>/dev/null || echo "$bucket: No lifecycle policy"
done
Step 2: Identify objects older than 90 days
aws s3api list-objects-v2 \
--bucket your-bucket-name \
--query 'Contents[?LastModified<=`$(date -u -d "90 days ago" +%Y-%m-%d)`].Key'
Step 3: Create lifecycle policy file (lifecycle.json)
{
"Rules": [{
"ID": "OptimizeStorage",
"Status": "Enabled",
"Transitions": [
{"Days": 90, "StorageClass": "STANDARD_IA"},
{"Days": 365, "StorageClass": "GLACIER"}
]
}]
}
Step 4: Apply lifecycle policy to bucket
aws s3api put-bucket-lifecycle-configuration \
--bucket your-bucket-name \
--lifecycle-configuration file://lifecycle.json
Prevention Tips
Set default lifecycle policies: Configure lifecycle rules during bucket creation for all new projects.
Monitor access patterns: Use S3 Analytics to understand actual access patterns before setting transition rules.
Review retention requirements: Ensure lifecycle policies comply with your data retention and compliance requirements.
Automate with CloudFormation: Include lifecycle policies in infrastructure-as-code templates.
Automation Available
Skip the manual work. AWS Saver automatically identifies S3 lifecycle optimization opportunities using the same above 1GB and over 90 days criteria.
✅ Lifecycle policy detection - Scans all buckets for missing or incomplete policies
✅ Object age analysis - Identifies buckets with objects aged over 90 days in Standard storage
✅ Cost impact calculation - Shows potential monthly savings from IA/Glacier transitions
✅ Incomplete upload cleanup - Detects failed multipart uploads wasting storage costs