AccessDenied for ListObjects for S3 bucket when permissions are s3:*

前端 未结 13 906
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-29 22:02

I am getting:

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

When I try to get folder from

13条回答
  •  没有蜡笔的小新
    2021-01-29 22:29

    I had this issue my requirement i wanted to allow user to write to specific path

    {
                "Sid": "raspiiotallowspecificBucket",
                "Effect": "Allow",
                "Action": [
                    "s3:GetObject",
                    "s3:PutObject",
                    "s3:ListBucket"
                ],
                "Resource": [
                    "arn:aws:s3:::/scripts",
                    "arn:aws:s3:::/scripts/*"
                ]
            },
    

    and problem was solved with this change

    {
                "Sid": "raspiiotallowspecificBucket",
                "Effect": "Allow",
                "Action": [
                    "s3:GetObject",
                    "s3:PutObject",
                    "s3:ListBucket"
                ],
                "Resource": [
                    "arn:aws:s3:::",
                    "arn:aws:s3:::/*"
                ]
            },
    

提交回复
热议问题