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

前端 未结 13 809
佛祖请我去吃肉
佛祖请我去吃肉 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:35

    I like this better than any of the previous answers. It shows how to use the YAML format and lets you use a variable to specify the bucket.

        - PolicyName: "AllowIncomingBucket"
          PolicyDocument:
            Version: "2012-10-17"
            Statement:
              - Effect: "Allow"
                Action: "s3:*"
                Resource:
                  - !Ref S3BucketArn
                  - !Join ["/", [!Ref S3BucketArn, '*']]
    

提交回复
热议问题