S3政策无效的动作 - S3:ListAllMyBuckets动作、政策、ListAllMyBuckets

2023-09-11 09:44:49 作者:清风微拂发梢

我想这些policy通过 console.aws.amazon.com 在我的水桶:

I'm trying these policy through console.aws.amazon.com on my buckets:



    {
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "s3:ListBucket",
            "s3:GetBucketLocation",
            "s3:ListBucketMultipartUploads"
          ],
          "Resource": "arn:aws:s3:::itnighq",
          "Condition": {}
        },
        {
          "Effect": "Allow",
          "Action": [
            "s3:AbortMultipartUpload",
            "s3:DeleteObject",
            "s3:DeleteObjectVersion",
            "s3:GetObject",
            "s3:GetObjectAcl",
            "s3:GetObjectVersion",
            "s3:GetObjectVersionAcl",
            "s3:PutObject",
            "s3:PutObjectAcl",
            "s3:PutObjectAclVersion"
          ],
          "Resource": "arn:aws:s3:::itnighq/*",
          "Condition": {}
        },
        {
          "Effect": "Allow",
          "Action": "s3:ListAllMyBuckets",
          "Resource": "*",
          "Condition": {}
        }
      ]
    }

不过,我收到此错误信息: 政策无效的动作 - S3:ListAllMyBuckets 它似乎不喜欢资源:的,我也试着使用 ARN:AWS:S3 ::: 的* ,但它不工作的。

But I'm getting this error message: Policy has invalid action - s3:ListAllMyBuckets It doesn't seem to like "Resource": "" , I've also tried to use arn:aws:s3:::*, but it doesn't work either.

任何人有任何线索?

推荐答案

我想通了自己。它需要在完成的 IAM 的,而不是在S3中本身...

I figured out myself. It needs to be done in the IAM, not in S3 itself...