【发布时间】:2021-01-16 14:52:35
【问题描述】:
在将节点组添加到 eks 集群时,我收到了 InvalidParameterException。下面给出了完整的错误。
An error occurred (InvalidParameterException) when calling the CreateNodegroup operation: Following required service principals [ec2.amazonaws.com] were not found in the trust relationships of nodeRole arn:aws:iam:::role/aws-service-role/eks-nodegroup.amazonaws.com/AWSServiceRoleForAmazonEKSNodegroup
但是在向角色添加主要策略时,我得到了This policy contains the following error: Has prohibited field Principal For more information about the IAM policy grammar, see AWS IAM Policies
我使用的aws cli版本是aws-cli/1.18.211 Python/3.8.7 Darwin/17.2.0 botocore/1.19.51
【问题讨论】:
-
您能否展示实际的政策以及您要添加什么内容?
-
{ “版本”:“2012-10-17”,“声明”:[ { “效果”:“允许”,“主体”:{ “服务”:“ec2.amazonaws.com ", "AWS": "arn:aws:iam::
:user/*" }, "Action": "sts:AssumeRole" } ] }
标签: amazon-ec2 aws-cli amazon-eks