Amazon S3异常:“指定的密钥不存在" [英] Amazon S3 exception: "The specified key does not exist"

查看:2480
本文介绍了Amazon S3异常:“指定的密钥不存在"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过getObject请求在Android应用中使用AmazonS3Client从我的Amazon S3存储桶下载图像.

I am using the AmazonS3Client in an Android app using a getObject request to download an image from my Amazon S3 bucket.

当前,我遇到此异常:

com.amazonaws.services.s3.model.AmazonS3Exception: 
The specified key does not exist.
 (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey;

即使我能够在S3存储桶中看到具有指定键的对象.

Even though I am able to see the object with the specified key in my S3 bucket.

推荐答案

这个错误实际上很简单.这仅表示您的文件不在S3存储桶中.几件事可能是错误的:

Well this error is actually rather straight forward.  it simply means that your file does not exist up within the S3 bucket.  Several things could be wrong:

  1. 您可能正在尝试引用错误的文件.仔细检查您尝试检索的路径.

  1. You could be trying to reference the wrong file.  Double check the path that you tried to retrieve.

无论何时上传文件,它都一定会失败.检查您的S3Sync进程的日志,以查看是否可以找到任何相关的输出

Whenever the file was uploaded it must have failed.  Check the logs for your S3Sync process to see if you can find any relevant output

来源

这篇关于Amazon S3异常:“指定的密钥不存在"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆