When I restore glacier archive file in s3,I am facing with GlacierSelectNotAvailable error. I try to setting up the params of restoreObject but I keep getting that error. I use Nodejs AWS SDK.
var params = {
Bucket: 'test_bucket',
Key: 'userInfo_glacier.csv',
RequestPayer: 'requester',
RestoreRequest: {
OutputLocation: {
S3: {
BucketName: 'test_bucket',
Prefix: 'test',
StorageClass: 'GLACIER',
}
},
SelectParameters: {
Expression: 'SELECT * FROM Object',
ExpressionType: 'SQL',
InputSerialization: {
CSV: {
Comments: '#',
FieldDelimiter: ',',
FileHeaderInfo: 'IGNORE',
QuoteCharacter: '"',
QuoteEscapeCharacter: '"',
RecordDelimiter: '\n'
}
},
OutputSerialization: {
CSV: {
FieldDelimiter: ',',
QuoteCharacter: '"',
QuoteEscapeCharacter: '"',
QuoteFields: 'ASNEEDED',
RecordDelimiter: '\n'
}
}
},
Tier: 'Expedited',
Type: 'SELECT'
}
};
s3.restoreObject(params, function (err, data) {
if (err) console.log(err.stack); // an error occurred
else console.log('data--', data); // successful response
});
GlacierSelectNotAvailable: Glacier Select retrievals are currently not available. Please try again later.
It's not a problem with your code, it's just as they say, you can't use Glacier Select at this time so you just have to wait and try again later.
It's not clear if the error is caused by downtime, traffic, whether it happens to certain accounts, all accounts or on retrieval requests hitting specific regions. I was getting the same error so I set up a POST request to perform the select directly and still got the same error.
I kept retrying the exact same POST request once a day, and two days later it was working.
Retrievals are pretty rare and costly in Glacier so don't expect them to always be readily available when you need them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With