NoSuchKeyExists
If you upload a file with the same name as an existing file in the directory, this error occurs.
- Description
- If a file exists then the same name of file uploading directory fails with the
NoSuchKey
error.s3u9k s3 ls s3://demo-bucket-200 2025-04-22 08:00:32 15 file1
Upload
file1
from dir1 path.dir1 path is dir1/dir2/file1 s3u9k s3 cp dir1 s3://demo-bucket-200 --recursive
- Error
- upload failed: dir1/dir2/file1 to s3://demo-bucket-200/dir2/file1 An error occurred
(
NoSuchKey
) when calling thePutObject
operation: The specified key does not exist. - Workaround
- Rename the directory and try again. For example, dir1/dir3/file1.