Aws-cli: aws s3 cp/mv --recursive incorrectly reports object as needing to be restored from glacier

Created on 15 Jan 2017  路  3Comments  路  Source: aws/aws-cli

I have a directory of files on S3 that was transitioned to glacier. The files were recently restored from Glacier and have not yet expired. I can copy individual files using "aws s3 cp". But, if I attempt to recursively copy the entire directory, the aws cli gives me the following error on all files:

```
warning: Skipping file s3://. Object is of storage class GLACIER. Unable to perform download operations on GLACIER objects. You must restore the object to be able to the perform operation.

$ aws --version
aws-cli/1.11.36 Python/2.6.6 Linux/2.6.32-504.8.1.el6.x86_64 botocore/1.4.93

$ cat /etc/redhat-release
CentOS release 6.6 (Final)

$ aws s3 cp s3:/// /tmp --recursive
warning: Skipping file s3://. Object is of storage class GLACIER. Unable to perform download operations on GLACIER objects. You must restore the object to be able to the perform operation.
.......

$ aws s3api head-object --bucket --key
{
"Restore": "ongoing-request="false", expiry-date="Sun, 22 Jan 2017 00:00:00 GMT"",
"AcceptRanges": "bytes",
"ContentType": "binary/octet-stream",
"LastModified": "Fri, 02 Oct 2015 23:41:22 GMT",
"ContentLength": 36,
"VersionId": "Ed6hvaWEg8d.K6m7gwJ_Z4gqOFkYDrrP",
"ETag": ""6009be9a36f7e5d4a47961681e11b5ac"",
"StorageClass": "GLACIER",
"Metadata": {}
}

Most helpful comment

Google led me here for the same error message. It would be nice if that option were suggested in the error message.

All 3 comments

I needed to use --force-glacier-transfer.

Google led me here for the same error message. It would be nice if that option were suggested in the error message.

how much cost in money it takes on this flag " --force-glacier-transfer." ?

Was this page helpful?
0 / 5 - 0 ratings