Skip to content
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

@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
Copy link
Author

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

@mheffner
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
Copy link

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

thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
* ci: Enable basic mypy typechecking
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
…he future (aws#2396)

* Revert "Remove import from builtins"

This reverts commit 0ecbbe45105896e8e4c9c1823c75e490752b0433.

* Revert "chore: Enable basic mypy typechecking"

This reverts commit 9d29984c652ef8d0466e023cd5ee79503aa4a9e9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants