AWS S3 Bucket Permissions - Access Denied

后端 未结 9 511
独厮守ぢ
独厮守ぢ 2020-12-30 19:12

I am trying to give myself permission to download existing files in an S3 bucket. I\'ve modified the Bucket Policy, as follows:

        {
        \"Sid\": \"         


        
9条回答
  •  被撕碎了的回忆
    2020-12-30 19:42

    David, You are right but I found that, in addition to what bennie said below, you also have to grant view (or whatever access you want) to 'Authenticated Users'. enter image description here

    But a better solution might be to edit the user's policy to just grant access to the bucket:

    {
       "Statement": [
        {
          "Sid": "Stmt1350703615347",
          "Action": [
            "s3:*"
          ],
          "Effect": "Allow",
          "Resource": [
            "arn:aws:s3:::mybucket/*"
          ]
        },
        {
          "Effect": "Allow",
          "Action": [
            "s3:ListBucket"
          ],
          "Resource": ["arn:aws:s3:::mybucket"],
          "Condition": {}
        }
      ]
    }
    

    The first block grants all S3 permissions to all elements within the bucket. The second block grants list permission on the bucket itself.

提交回复
热议问题