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
CopyObject says NoSuchKey despite GetObject showing that there is such a key #1438
Comments
Hi @meirf thanks for contacting us. Could you provide an example of the keys that you're running into an issue with? This would greatly help is investigating the issue if you're able to provide an example of object key's that seem to be problematic. The only thing I think could be causing an issue with the example code above is the |
In addition I suggest checking how the |
Here are example keys being rejected:
Tha |
Thanks for the additional information. I think part of the issue for those is that the |
Okay. I now know both categories of errors I was seeing: trailing Thank you. |
Glad to help, let us know if you have any additional feedback, issues, or questions with the SDK. |
although this issue is referenced for aws-sdk-go, the same thing helped me for aws-sdk-js. Thank you !! |
@xibz , here is the more focused version of #1431
Please fill out the sections below to help us address your issue.
Version of AWS SDK for Go?
1.8.11
Version of Go (
go version
)?1.8.3
What issue did you see?
CopyObject
is returning an error "NoSuchKey: The specified key does not exist." even thoughGetObject
on that exact key is returning that object's data showing that it does exist. This is happening on a tiny fraction of the objects that I'm copying.My goal is to copy data in the following scheme:
(original)
BUCKET_BAZ
key_foo
key_bar
(goal)
BUCKET_BAZ
key_foo
key_bar
copy_folder
key_foo
key_bar
Almost all objects are copied into
copy_folder
, but certain files always give theNoSuchKey
error when beingCopy
-ed. It's always the same files that are problematic. I don't know what's different about these files.Steps to reproduce
Unfortunately, I am only able to reproduce this on my own data. I don't know how to generate these problematic files, but once I know which file is problematic, here is how I show the problem in code:
The CLI
aws s3 cp
does work on the same key.All the problematic files I've seen so far have
WebsiteRedirectLocation
set, but I don't think that's the issue because some of the files that are copied successfully also have that field set.The text was updated successfully, but these errors were encountered: