Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glacier retrieval notification of s3 objects

I have some s3 buckets which send their objects to glacier after x days of creation. When I go to retrieve those objects on the s3 interface, I need to keep reloading page to see when restoration has finished so object is ready for download.

I'd like to have s3 send an sns notification when that restoration is finished so object is ready.

You can configure that on glacier vault notifications tab, but you can't on s3.

like image 799
alexandresaiz Avatar asked Oct 25 '13 10:10

alexandresaiz


2 Answers

Might be too late for this question, but my 2cents anyways.

You can configure s3 event notifications on object restore from glacier storage class. See s3:ObjectRestore:Completed in AWS documentation

like image 162
coppaste Avatar answered Oct 08 '22 06:10

coppaste


You can ask S3 to restore via the API. Restoring objects describes how to initiate the restore and check its status via the console, Java, .NET, or the REST API. I suspect clients in other languages provide similar features.

I do think it would be nice to have a notification, but you could accomplish something similar on your own. Set up a SQS queue, and when your application initiates the restore, send a message with a 3 hour delay (based on their documentation). Once you receive it, check the restoration status. If restored, process as desired. If not, delay the message another 15 minutes. Repeat until object restoration occurs.

like image 33
Steven Hood Avatar answered Oct 08 '22 08:10

Steven Hood