Warm tip: This article is reproduced from serverfault.com, please click

amazon s3-即使键存在,S3也给我NoSuchKey错误

(amazon s3 - S3 giving me NoSuchKey error even when the key exists)

发布于 2017-06-27 10:51:31

这是我的boto3命令,用于从S3存储桶中获取具有特定键的对象:

resp = s3client.get_object(Bucket='<>-<>', Key='MzA1MjY1NzkzX2QudHh0')

它给出以下错误:

botocore.errorfactory.NoSuchKey: An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.

我已在存储桶中签入,并且密钥实际上存在

在此处输入图片说明

我错过了什么还是在这里做错了什么?

Questioner
Dawny33
Viewed
0
Chris Pollard 2017-06-27 19:20:23

URL的末尾有%0A;那是一个行分隔符。