Getting Access Denied when calling the PutObject operation with bucket-level permission

前端 未结 14 1365
醉话见心
醉话见心 2020-12-12 13:37

I followed the example on http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_examples.html#iam-policy-example-s3 for how to grant a user access to just one buck

14条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 13:46

    To answer my own question:

    The example policy granted PutObject access, but I also had to grant PutObjectAcl access.

    I had to change

    "s3:PutObject",
    "s3:GetObject",
    "s3:DeleteObject"
    

    from the example to:

    "s3:PutObject",
    "s3:PutObjectAcl",
    "s3:GetObject",
    "s3:GetObjectAcl",
    "s3:DeleteObject"
    

    You also need to make sure your bucket is configured for clients to set a public-accessible ACL by unticking these two boxes:

提交回复
热议问题