Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right, but if you want to retrieve some data through their API, how does it work? Normally you open the connection, ask for the data, then receive it and close the connection, does that change if there's a 5+ hour wait between the ask and the receive? Do you just leave the connection open? Provide them with a webhook to call when it's ready? I don't personally care about the answer but I'm pretty sure that's what they were asking.


Well the CLI gives you a job ID that you can use to check on the status and retrieve when it's ready. You can also ask to be notified by SNS.

http://docs.aws.amazon.com/cli/latest/reference/glacier/init...


With Glacier you submit an "InitiateJob" request to say "Fetch me this archive". That returns you a job ID in the response.

From there you can submit a "DescribeJob" request, with that Job ID as the parameter, and the Glacier service responds with the state of the job.

Once the job is marked as complete, you submit a "GetJobOutput" request with that Job ID. That response is the archive body. (similar to how you'd do a GET request from S3).

You've got 24 hours to start the download of the archive before you'll have to repeat the entire InitiateJob->GetJobOutput cycle again.


At work our needs are simple, we manually run the aws cli to sync files up to S3 where there's a 1 day lifecycle policy to move them to Glacier. We don't use the API for restores, we do those through the web console and check back in a few hours to see if the files are downloadable.

I think through the API you do not leave the connection open, you check with whatever frequency you want and when it's ready, the response will include the temporary location on S3 for the file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: