S3 Bucket action doesn't apply to any resources

前端 未结 11 691
无人及你
无人及你 2021-01-30 09:55

I\'m following the instructions from this answer to generate the follow S3 bucket policy:

{
  \"Id\": \"Policy1495981680273\",
  \"Version\": \"2012-10-17\",
  \         


        
11条回答
  •  终归单人心
    2021-01-30 10:38

    Just ran into this issue and found a shorter solution for those that want to have ListBucket and GetObject in the same policy.

    {
      "Id": "Policyxxxx961",
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "Stmtxxxxx4365",
          "Action": [
            "s3:GetObject",
            "s3:ListBucket",
            "s3:PutObject"
          ],
          "Effect": "Allow",
          "Resource": [
              "arn:aws:s3:::bucket-name",
              "arn:aws:s3:::bucket-name/*"
          ],
          "Principal": "*"
        }
      ]
    }
    

提交回复
热议问题