Amazon S3 异常:“指定的密钥不存在"

编程入门 行业动态 更新时间:2024-10-26 02:33:59
本文介绍了Amazon S3 异常:“指定的密钥不存在"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在 Android 应用程序中使用 AmazonS3Client,使用 getObject 请求从我的 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:

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

  • 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 异常:“指定的密钥不存在"

    本文发布于:2023-10-07 10:34:35,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1469152.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:密钥   不存在   异常   Amazon   quot

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!