Archival Policies With CloudFormation
Draft of this has been untouched for 6 months, posting in case anyone needs a snippet for a CF template.
"S3BackupBucket": {
"Type" : "AWS::S3::Bucket",
"Properties" : {
"BucketName" : "my-unique-s3-bucket"},
"LifecycleConfiguration": {
"Rules": [
{
"Id": "GlacierRuleDBData",
"Status": "Enabled",
"ExpirationInDays": "460",
"Prefix" : "backup/database",
"Transitions": [
{
"TransitionInDays": "35",
"StorageClass": "GLACIER"
}
]
},
{
"Id": "IARuleAppData",
"Status": "Enabled",
"Prefix" : "backup/appdata",
"Transitions": [
{
"TransitionInDays": "30",
"StorageClass": "STANDARD_IA"
}
]
}
]
}
}
}