简体   繁体   English

创建基于资源的策略时出错

[英]Error while creating resource based policy

Trying to create a resource-based policy and specifying a group as principal but it is failing,尝试创建基于资源的策略并将组指定为主体,但失败了,

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::<acc_number>:group/dev-group"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::<bucket>/text.txt"
        }
    ]
}

It fails with error:它失败并出现错误:

在此处输入图片说明

This is not possible, per AWS documentation.根据 AWS 文档,这是不可能的。

You can specify any of the following principals in a policy:您可以在策略中指定以下任何主体:

  • AWS account and root user AWS 账户和根用户
  • IAM users IAM 用户
  • Federated users (using web identity or SAML federation)联合用户(使用 Web 身份或 SAML 联合)
  • IAM roles IAM 角色
  • Assumed-role sessions假定角色会话
  • AWS services AWS 服务
  • Anonymous users (not recommended)匿名用户(不推荐)

JSON policy documentation JSON 政策文档

AWS support forum AWS 支持论坛

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建策略 IAM 资源路径时出错必须是 - Getting error while creating the policy IAM resource path must either be 通过 Cloud Formation 创建 Amazon Elasticsearch 服务时出现 CloudWatch 资源访问策略错误 - CloudWatch resource access policy error while creating Amazon Elasticsearch Service via Cloud Formation 创建IAM托管策略时出错 - Error while creating a IAM Managed Policy 无服务器中基于资源的策略 - Resource Based Policy In Serverless 资源在基于资源的政策中的重要性 - Significance of resource in Resource Based Policy 添加基于资源的策略与 IAM 策略 - Adding a resource based policy vs IAM policy AWS 无服务器框架:创建 IAM 角色和策略时出现 MalformedPolicyDocument 错误 - AWS Serverless Framework : MalformedPolicyDocument Error while creating IAM Role and Policy AWS 角色策略:Terraform:创建 IAM 角色时出错。 MalformedPolicyDocument:已禁止字段资源 - AWS Role-Policy: Terraform: Error creating IAM Role. MalformedPolicyDocument: Has prohibited field Resource Serverless Lambda Resource Based Policy - 所有原则 - Serverless Lambda Resource Based Policy - All Principles 如何在 Cloudformation 中编写基于资源的策略 - How to write Resource-based policy in Cloudformation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM