Restoring an archived object
Amazon S3 objects that are stored in the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes are not immediately accessible. To access an object in these storage classes, you must restore a temporary copy of it to its S3 bucket for a specified duration (number of days). For information about using these storage classes, see Using Amazon S3 storage classes and Managing your storage lifecycle.
Restored objects from S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive are stored in Amazon S3 Standard only for the number of days that you specify. If you want a permanent copy of the object, create a copy of it in your Amazon S3 bucket. Unless you make a copy, the object will still be stored in the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.
To calculate the expiry date, Amazon S3 adds the number of days that you specify to the
time that you request to restore the object, and then rounds to the next day at midnight
UTC. This calculation applies to the initial restoration of the object and to any
changes to availability that you request. For example, if an object was restored on
October 15, 2012, at 10:30 AM UTC, and the number of days that you specified is
3
, the object is available until October 19, 2012, at 00:00
UTC. If, on October 16, 2012, at 11:00 AM UTC, you change the number of days that you
want the object to be accessible to 1
, Amazon S3 makes the restored
object available until October 18, 2012, at 00:00 UTC.
When you restore an archived object, you are paying for both the archive and a copy
that you restored temporarily. For information about pricing, see Amazon S3 pricing
You can restore an archived object by using the Amazon S3 console, the REST API, the AWS SDKs, and the AWS Command Line Interface (AWS CLI).
Use the following steps to restore an object that has been archived to the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes, to check the status, and to upgrade an in-progress restore. (The console uses the names S3 Glacier Flexible Retrieval and Glacier Deep Archive for these storage classes.)
To restore an archived object
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 contains the objects that you want to restore.
-
In the Objects list, select the object or objects that you want to restore, choose Actions, and then choose Initiate restore.
-
If you're restoring from S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive, enter the number of days that you want your archived data to be accessible in the Initiate restore dialog box.
-
In Retrieval options, do one of the following:
-
Choose Bulk retrieval or Standard retrieval, and then choose Restore.
-
Choose Expedited retrieval (available only for S3 Glacier Flexible Retrieval or S3 Intelligent-Tiering Archive Access).
-
-
Provisioned capacity is only available for objects in S3 Glacier Flexible Retrieval. If you have provisioned capacity, choose Restore to start a provisioned retrieval.
If you have provisioned capacity, all of your expedited retrievals are served by your provisioned capacity. For more information, see Provisioned capacity.
-
If you don't have provisioned capacity and you don't want to buy it, choose Restore.
-
If you don't have provisioned capacity, but you want to buy it, choose Add capacity unit, and then choose Buy. When you get the Purchase succeeded message, choose Restore to start provisioned retrieval.
-
You can upgrade the speed of your restoration while it is in progress.
To upgrade an in-progress restore to a faster tier
Open the Amazon S3 console at https://console.aws.amazon.com/s3/
. -
In the Bucket name list, choose the name of the bucket that contains the objects that you want to restore.
-
In the Objects list, select one or more of the objects that you are restoring, choose Actions, and then choose Restore from S3 Glacier Flexible Retrieval. For information about checking the restoration status of an object, see Checking restore status and expiration date.
-
Choose the tier that you want to upgrade to, and then choose Restore.
For information about upgrading to a faster restore tier, see Upgrading the speed of an in-progress restore.
Note
Standard and bulk restores for S3 Intelligent-Tiering are free of charge. However, subsequent restore requests called on an object that is already being restored are billed as a GET request.
Checking restore status and expiration date
You can check the progress of the restoration on the Object overview page. For more information, see Viewing an object overview in the Amazon S3 console. This page will show that the restoration is In progress.
If you're restoring from S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive, the temporary copy of the Object overview shows the Restoration expiry date. Amazon S3 will remove the restored copy of your archive on this date.
Restored objects from S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive are stored only for the number of days that you specify. If you want a permanent copy of the object, create a copy of it in your Amazon S3 bucket.
After restoring an object, you can download it from the Overview page. For more information, see Viewing an object overview in the Amazon S3 console.
Amazon S3 provides an API for you to initiate an archive restoration. For more information, see RestoreObject in the Amazon Simple Storage Service API Reference.
Use the restore-object
command to restore objects from S3 Glacier Flexible Retrieval.
The following example restores the object
in
dir1/example.obj
for 25 days.DOC-EXAMPLE-BUCKET
aws s3api restore-object --bucket
DOC-EXAMPLE-BUCKET
--key dir1/example.obj
--restore-request '{"Days":25,"GlacierJobParameters":{"Tier":"Standard"}}'
If the JSON syntax used in the example results in an error on a Windows client, replace the restore request with the following syntax:
--restore-request Days=25,GlacierJobParameters={"Tier"="Standard"}
To monitor the status of your restore-object
request, use the
following head-object
command:
aws s3api head-object --bucket
DOC-EXAMPLE-BUCKET
--keydir1/example.obj
For more information, see restore-object in the AWS CLI Command Reference.