I'm very confused about lifecycle rules with AWS Glacier. I was under the impression I could upload a file to S3, have it go to glacier, and then delete it from S3 and retrieve it from glacier later.
I'm using a clojure wrapper for the AWS SDK and using the method "restore-object"
(aws/restore-object credentials bucket-name _key restore-method)
The method call appears to be correct because when I call it on a file which has not been archived to S3, I get an error that the key is not of storage class glacier. But when I call it on a file which has already been archived and deleted, the message is
The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: D101BCAC349AF0DA)
So, exactly the key shouldn't exist in S3, because it's archived. Where is the key? How can I see which keys do exist?
I would very much like to jump start this feedback loop. Using the lifecycle rules, the only action i can see is applying a rule to a folder, if expiration is on, the files go away after a day, I can't browse glacier as there's no GUI for that. Not sure if i should be "expiring" objects at all. I assumed "expire" means deleting it from S3 and making it only available in Glacier. After it is in Glacier, would it shows "storage class = glacier " within the S3 interface ?
You cannot change the S3 object's storage class to Glacier manually, it appears. I can change to reduced redundancy, calling restore-object on that still results in
Restore is not allowed, as object's storage class is not GLACIER
(Service: Amazon S3; Status Code: 403; Error Code:
InvalidObjectState; Request ID: 85A4913F2CE81872)
So how in the world am I supposed to test this?
I'm going to attempt to test this by removing the "expiration" property and just cross my fingers that this time tomorrow, the storage class changes to "Glacier" in S3 and I can continue testing. If anyone has any pointers to shorten this feedback look I would be tremendously grateful!