i am storing objects to S3, i would like that object never accessed in the last month go to glacier.
After some research i don't think i can achieve this, but i hope to be wrong.
When creating lifecycle for an s3 bucket the rule is based on object creation date (not last access date)
Setting the storage class for the object will not help according to http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
"You cannot associate an object with the Glacier storage class as you upload it. You transition existing Amazon S3 objects to the Glacier storage class by using lifecycle management. For more information, see Object Lifecycle Management."
Does anyone know how can achieve this?
Thanks
You cannot add conditional policies that apply to objects in S3 object lifecycle configuration which in your case is, is based on the object's last access time.
You can however transition objects to Glacier based on their age or on a specific date.
I would like to think you can handle it in your application but the s3 object returned does not have the last access time, if you use the the AWS SDK.
Details here
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