Backup lifecycle policy
Move data through lower-cost tiers and set a planned expiry date.
# Save this policy as lifecycle.json
aws s3api put-bucket-lifecycle-configuration \
+ --bucket company-backups \
+ --lifecycle-configuration file://lifecycle.json
{
"Rules": [
{
"ID": "netops-lifecycle",
"Status": "Enabled",
"Filter": {
"Prefix": ""
},
"Transitions": [
{
"Days": 30,
"StorageClass": "STANDARD_IA"
},
{
"Days": 90,
"StorageClass": "GLACIER"
}
],
"Expiration": {
"Days": 365
}
}
]
}Retention warningLifecycle rules can make data unavailable or delete it permanently. Confirm backup restores, legal retention, object locks and archive retrieval costs before deployment.