Project

General

Profile

Glacier » History » Version 4

Peter Amstutz, 08/03/2020 09:17 PM

1 1 Peter Amstutz
h1. Glacier
2
3 4 Peter Amstutz
Amazon also calls them "storage classes".  Will call it "s3 storage class" here.
4 2 Peter Amstutz
5 1 Peter Amstutz
https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html
6
7
https://docs.aws.amazon.com/sdk-for-go/api/service/s3/
8 3 Peter Amstutz
9 4 Peter Amstutz
Can do PutObject directly to Glacier or you can use CopyObject to change the s3 storage class of an existing object from "standard" to "glacier".  (The docs are unclear but I guess you copy the object to itself?)
10 3 Peter Amstutz
11
https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-howtoset
12
13 4 Peter Amstutz
Objects in Glacier do appear in index listing.  Listing includes storage class for each object.
14 1 Peter Amstutz
15
Returns a 403 error if you try GetObject on an archived object.
16
17 4 Peter Amstutz
Use RestoreObject to make it available for GetObject on a temporary basis (you specify number of days in the request).  The s3 storage class of the object is still "glacier".
18
19
  A successful [RestoreObject] operation returns either the 200 OK or 202 Accepted status code.
20
    If the object copy is not previously restored, then Amazon S3 returns 202 Accepted in the response.
21
    If the object copy is previously restored, Amazon S3 returns 200 OK in the response.
22
23
GetObject/HeadObject include restore status in "x-amz-restore" response header.  Does not appear that listing includes restore status.
24 3 Peter Amstutz
25
Unclear from documentation if you can use CopyObject to change the storage class back to "standard" after being restored.
26
27
https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html
28
29
Use S3 Batch operation to operate on many objects at once.