Getting the contents of an S3 Glacier Vault

0

I am using the AWS CloudShell CLI and trying to get (and download to a file through my browser) a list of the archives in an S3 Glacier vault and losing my mind. I first ran the "iniitiate-job" command and that ran for over an hours, then returned a "Succeeded" response to the "describe-job" command. Then I tried several variations of the "get-job-output" command, all of which failed for various reasons:

aws glacier get-job-output --vault-name [MY VAULT] --account-id - --job-id [MY JOB ID] output.json ----- this just returned headers: { "status": 200, "acceptRanges": "bytes", "contentType": "application/json" }

aws glacier get-job-output --account-id - --vault-name [MY VAULT] --job-id [MY JOB ID] output.json > output.json ----- this just ran and then returned me to the command line

aws glacier get-job-output --account-id - --vault-name [MY VAULT] --job-id [MY JOB ID] --query 'body.archiveDescription' --output text > output.json ----- this returned an error: "aws: error: the following arguments are required: outfile"

aws glacier get-job-output --account-id - --vault-name [MY VAULT] --job-id [MY JOB ID] --outfile output.json ----- this returned an error: "Unknown options: --outfile"

End of my wits!! Will someone please show me how easy this is and why I am a total failure?

profile picture
asked 9 months ago400 views
4 Answers
0

Based on what you described, first one looks absolutely fine and it's not failed but succeeded. All you need to do is check the content of output.json file. Aren't you able to see output.json file?

Here is the re:Post Knowledge Center Article, which you'd have already gone through, take a look if not.

Based on **glacier get-job-output** command synopsis, first output is the expected one, where you got status 200.

Enter image description here

Pardon me if I misunderstood your question. Let me know what exactly are you trying to achieve? I've glacier vault setup and do use it quite often so please comment here if you have questions, I can definitely help.

Abhishek

profile pictureAWS
EXPERT
answered 9 months ago
0

Thank you for your reply. What command / procedure do I use to "see the output.json file" - that is specifically where I am stuck.

profile picture
answered 9 months ago
0

PS, I tried aws glacier get-job-output --account-id - --[MY VAULT] --job-id [MY JOB ID] | jq -r '.body.archiveDescription' > output.json

aws glacier get-job-output --account-id - --vault-name [MY VAULT] --job-id [MY JOB ID] | jq -r '.body.archiveDescription' > output.tmp && cat output.tmp

both resulted in the following error: "aws: error: the following arguments are required: outfile"

profile picture
answered 9 months ago
0

Never mind - I missed the little Actions/Download File menu in the upper right of the interface. Duh!!!

profile picture
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions