AWS s3存储桶策略无效组主体

时间:2021-01-26 10:47:13

This is a follow on from How can i enforce file type uploads with an AWS S3 bucket policy

以下是如何使用AWS S3存储桶策略强制执行文件类型上载

When applying the bucket policy:

应用存储桶策略时:

{
  "Version":"2008-10-17",
  "Statement": [
    {
      "Sid":"AddPerm",
      "Effect":"Allow",
      "Principal": { "AWS": "arn:aws:iam::111122223333:group/admins" },
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::bucket/*.txt"
    }
  ]
}

The group "admins" definitely exists, but I get the error: "Invalid principal in policy - "AWS" : "arn:aws:iam::111122223333:group/admins""

组“管理员”肯定存在,但我收到错误:“策略中的无效主体 - ”AWS“:”arn:aws:iam :: 111122223333:group / admins“”

Why is it not recognised?

为什么不被认可?

1 个解决方案

#1


16  

It's not possible to use groups in Principal at the moment. See https://forums.aws.amazon.com/message.jspa?messageID=356160

目前无法在Principal中使用组。请参阅https://forums.aws.amazon.com/message.jspa?messageID=356160

#1


16  

It's not possible to use groups in Principal at the moment. See https://forums.aws.amazon.com/message.jspa?messageID=356160

目前无法在Principal中使用组。请参阅https://forums.aws.amazon.com/message.jspa?messageID=356160