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.
It almost takes 48 hours to flag the objects with the new storage class.
Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/ . In the Buckets list, choose the name of the bucket that you want to create a lifecycle rule for. Choose the Management tab, and choose Create lifecycle rule. In Lifecycle rule name, enter a name for your rule.
Amazon S3 Lifecycle configuration rules run once a day. Check and confirm whether the rule has transitioned the storage class. The total number of objects in the bucket affects the time it takes for you to see the change in storage class.
S3 bucket lifecycle rules apply to both existing and new data in S3. In addiiton to Mircea answer: New lifecycle rules can take up to 48 hours to complete the first run. If there are millions of objects for the rule, then it might take a few runs for all the objects to be transitioned into another storage class.
An S3 Lifecycle configuration is an XML file that consists of a set of rules with predefined actions that you want Amazon S3 to perform on objects during their lifetime. You can also configure the lifecycle by using the Amazon S3 console, REST API, AWS SDKs, and the AWS Command Line Interface (AWS CLI).
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With