- Newest
- Most votes
- Most comments
Restoring objects from S3 Glacier Deep Archive to the S3 Standard storage class requires two steps:
Step 1: Initiate a restore request
aws s3api restore-object \ --bucket your-bucket \ --key your-object-key \ --restore-request '{"Days":7,"GlacierJobParameters":{"Tier":"Standard"}}'
Deep Archive retrieval takes up to 12 hours (Standard) or 48 hours (Bulk). Expedited retrieval is not available for Deep Archive.
Step 2: Verify restore completion, then copy to Standard
Check status:
aws s3api head-object --bucket your-bucket --key your-object-key
When ongoing-request="false" appears in the response, the restore is complete. Then copy the object to Standard:
aws s3 cp s3://your-bucket/your-key s3://your-bucket/your-key --storage-class STANDARD
Why the error occurs:
The restore-object API creates a temporary accessible copy — it does not change the object's storage class. Until you explicitly copy the object with --storage-class STANDARD, the original remains in Deep Archive and will continue to show the Glacier alert.
References:
- Restoring archived objects- https://docs.aws.amazon.com/AmazonS3/latest/userguide/restoring-objects.html
- Archive retrieval options- https://docs.aws.amazon.com/AmazonS3/latest/userguide/restoring-objects-retrieval-options.html
- restore-object CLI reference- https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html
answered 4 months ago
When restoring objects from S3 Glacier Deep Archive to the Standard storage class, you need to follow a two-step process:
-
First, you must initiate a restore request for the objects in Deep Archive and wait until a temporary copy becomes available. This temporary copy will be available for the duration you specify in your restore request (e.g., 5 days).
-
Once the temporary copy is available, you need to create a permanent copy of the object in the Standard storage class before the temporary copy expires.
It's important to understand that when you restore an object from Deep Archive, the object's storage class remains Deep Archive - the restore process only creates a temporary accessible copy. This is likely why you're still getting alerts that the object is in Glacier.
To properly move the object to Standard storage class, after the restore completes, you need to copy the object to itself but specify the new storage class:
aws s3 cp s3://bucket-name/object-key s3://bucket-name/object-key --storage-class STANDARD
For multiple objects or folders, you can use S3 Batch Operations or a custom AWS CLI command to handle the process at scale.
Remember that there are costs associated with both the restore operation and maintaining both copies of the object until you delete the original Deep Archive version.
Sources
change storage class | AWS re:Post
RestoreObject - Amazon Simple Storage Service
Recover Glacier Deep Archive from a S3 Bucket | AWS re:Post
Working with archived objects - Amazon Simple Storage Service
answered a year ago
Relevant content
asked a year ago
asked 2 years ago
