- Newest
- Most votes
- Most comments
Hi,
No guarantee but I have seen such error "KeyNotFound" when the key was containing special characters.
See the various lists of such chars on https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html to compare the name of your object.
If it contains such chars, try to avoid them.
Best,
Didier
Hello.
Can you check inside the S3 bucket from the management console and confirm that there is actually an object in that key?
Also, is it possible that the key is specified incorrectly when executing the HeadObject request?
Yes, the object exists in that key. No, it works if the object size is few KB's.
At what file size does the problem occur? I would like to reproduce the problem in my environment. It would be helpful if you could also share the code you are using.
Please try the below link: https://privatebin.net/?8b6664e54be505f1#9WdVSnQcqsTRpdsTdmtGumcDTaT6gkSjLFtw5RbjusmG
Thanks for helping out. It turns out to be the special cases was the root cause. Not sure how the objects were exists in the path but still the HeadObject was failing. It's totally tricked me. Once again appreciate your help.
Relevant content
- asked 2 years ago

Verified. that was the issue. Appreciate the help.
Glad that it solved your issue. Thanks for accepting my answer!