bunnypiglet6211
bunnypiglet6211

Reputation: 1

AWS LAMBDA S3 Glacier - how to retrieve S3 Object if its storage Class is in Glacier

I was trying to download the file using Lambda NodeJS.

here is how we get the file from S3 using presigned URL

It is working fine.. but when ever we download a file which is in a GLACIER storage class it ends up having an error..

This is the  return of the presigned url when the object is glacier storage class

I have been looking on how to get the attributes of the object from lambda, so that we could do logic if we find the file is in what time of storage class..

Upvotes: 0

Views: 910

Answers (1)

Erico
Erico

Reputation: 1461

Files in Glacier cannot be retrieved in real time, once they're in Glacier they're archived.

To retrieve these files you first need to restore them.

Restoring archived objects: https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html

Upvotes: 0

Related Questions