1

I've initiated the retrieval of an S3 file using the Glacier Deep Archive storage class, using the AWS console. I just got a success message, and no link to a page where I can monitor the status of my retrievals.

Is there a way to see the list of pending retrieval jobs, together with their status, on the AWS console?

If not, I'd accept an AWS CLI command.

Tim
  • 31,888
  • 7
  • 52
  • 78
BenMorel
  • 4,507
  • 10
  • 57
  • 85

1 Answers1

2

From the s3 restore-object CLI documentation page.

To get the status of object restoration, you can send a HEAD request. (...) You can use Amazon S3 event notifications to notify you when a restore is initiated or completed. For more information, see Configuring Amazon S3 Event Notifications in the Amazon Simple Storage Service Developer Guide.

When it says "head" I assume it's referring to S3API Head. That would be:

aws s3api head-object --bucket my-bucket --key index.html

Note that this is using AWS CLI v2, if you're using V1 the syntax may be a bit different.

While the archive is being retrieved, the JSON will contain a Restore key similar to:

"Restore": "ongoing-request=\"true\""

When the archive is ready to be downloaded, the Restore key will change to something like:

"Restore": "ongoing-request=\"false\", expiry-date=\"Thu, 17 Sep 2020 00:00:00 GMT\""

You can then proceed with downloading the archive from the AWS S3 web console like any other file.

BenMorel
  • 4,507
  • 10
  • 57
  • 85
Tim
  • 31,888
  • 7
  • 52
  • 78
  • Thanks, but I do not see the `x-amz-restore` header in the output: https://pastebin.com/bYEWsKet – BenMorel Sep 08 '20 at 20:11
  • Are you calling it on the source object or the object being restored? It'd be worth trying it on both, or checking the docs to see what it suggests. From memory the docs were a bit vague. – Tim Sep 08 '20 at 20:27
  • I’m calling it on the source object. How do I know the key of the object being restored? – BenMorel Sep 08 '20 at 20:51
  • Not sure sorry, I've never tried it. Maybe someone else who has done this can help more. – Tim Sep 08 '20 at 21:11
  • 1
    Not sure if the docs are up to date; they might actually mean `HEAD` as an HTTP verb, as I've not been able to locate the `x-amz-restore` header. However, I got the answer to my question, in the form of the `Restore` key in the JSON output, and updated your answer accordingly. Hope you don't mind. Thanks! – BenMorel Sep 09 '20 at 22:38
  • Yeah good move adding more info :) – Tim Sep 09 '20 at 23:04