Search code examples
amazon-web-servicesamazon-s3amazon-glacier

Lifecycle policy on S3 not working


I have simply enabled a file cycle policy on a bucket in Amazon S3. This is the configuration:

root@iserver:~# aws s3api get-bucket-lifecycle-configuration --bucket ee-shares --profile s3toglacier
{
"Rules": [
{
"Status": "Enabled",
"Prefix": "",
"Transitions": [
{
"Days": 180,
"StorageClass": "GLACIER"
}
],
"ID": "test"
}
]
}

But I cannot see data on Glacier and objects older then 180 days do not show "Initial Restore" option in S3.


Solution

  • Amazon S3 lifecycle policies do not execute immediately. Allow up to 24 hours for them to archive content.

    Once archived, the objects will still appear in Amazon S3, but their storage class will be set to Glacier.