小编mi5*_*ded的帖子

AWS IAM 全局条件键 aws:PrincipalOrgPaths 抛出访问被拒绝

我正在尝试在 S3 存储桶策略中使用 IAM 全局条件键aws:PrincipalOrgPaths,但我不断收到“拒绝访问”错误。我可以很好地使用密钥aws:PrincipalOrgID。下面的消毒桶策略是我正在尝试使用的。

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "MyOrgOnly",
      "Effect": "Allow",
      "Principal": {
        "AWS": "*"
      },
      "Action": "s3:*",
      "Resource": [
        "arn:aws:s3:::thebucketofmydreams",
        "arn:aws:s3:::thebucketofmydreams/*"
      ],
      "Condition": {
        "ForAnyValue:StringLike": {
          "aws:PrincipalOrgPaths": "o-funny/r-stuff/ou-path"
        }
      }
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

amazon-s3 amazon-web-services amazon-iam

0
推荐指数
1
解决办法
411
查看次数