New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws s3 cp/mv --recursive incorrectly reports object as needing to be restored from glacier #2385

Closed
matt-sexton opened this Issue Jan 15, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@matt-sexton
Copy link

matt-sexton commented Jan 15, 2017

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://<name>. 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://<bucket>/<prefix> /tmp --recursive
warning: Skipping file s3://<name>. 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.
....<repeated for each object>...

$ aws s3api head-object --bucket <bucket> --key <name>
{
    "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": {}
}
@matt-sexton

This comment has been minimized.

Copy link

matt-sexton commented Jan 18, 2017

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

@mheffner

This comment has been minimized.

Copy link

mheffner commented Mar 6, 2017

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

@aliabbas-2012

This comment has been minimized.

Copy link

aliabbas-2012 commented Aug 3, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment