为什么我的终端返回这个 s3 错误? [英] Why is my terminal returning this s3 error?

查看:27
本文介绍了为什么我的终端返回这个 s3 错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我一直收到的错误:

Here's the error I keep receiving:

A client error (AccessDenied) occurred when calling the ListObjects operation: Access Denied

我已经三重检查了我的凭据,并用谷歌搜索了这个错误.我编辑了我的存储桶策略以添加 s3:ListBucket 操作,但无济于事.当我这样做时,它只会返回一条类似的消息:

I've triple-checked my credentials and googled this error to my wits' end. I edited my bucket policy to add an s3:ListBucket action, but to no avail. When I do so, it just returns a similar message:

A client error (AccessDenied) occurred when calling the ListBuckets operation: Access Denied

想法?这也是我第一次创建 s3 存储桶,因此很可能我错过了一些重要步骤.

Thoughts? This is also my first time creating an s3 bucket so it's quite possible I missed some important step.

我对我的密钥进行了三次检查,甚至尝试创建一个额外的用户(编辑存储桶权限以允许经过身份验证的用户).总是返回相同的错误.

I have triple-checked my keys and even tried creating an additional user (editing the bucket permissions to allow for authenticated users). Always returns the same error.

非常非常感谢任何帮助或见解.谢谢!

Any help or insight would be very, very much appreciated. Thank you!

推荐答案

在遇到与您相同的(第二个)错误后,我发现了这个问题:

I found this question after I was getting the same (2nd) error as you:

$ aws s3 ls

A client error (AccessDenied) occurred when calling the ListBuckets operation: Access Denied

事实证明,有一个特定的政策许可 您需要添加才能列出所有可用的存储桶:

It turns out that there is a specific policy permission that you need to add to be able to list all the available buckets:

{
    "Sid": "AllowListingOfAllBuckets",
    "Effect": "Allow",
    "Action": [
        "s3:ListAllMyBuckets"
    ],
    "Resource": [
        "arn:aws:s3:::*"
    ]
},

由于您没有说明您正在运行哪个命令来生成错误,所以我不能说这是否对 OP 有帮助,但希望它会帮助其他在相同情况下偶然发现此帖子的人我.

As you don't state which command you were running to generate the error, I can't say whether this will be helpful to the OP, but hopefully it will help someone else who stumbles upon this post in the same situation as me.

这篇关于为什么我的终端返回这个 s3 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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