While adding nodegroup to eks cluster I am getting InvalidParameterException. The full error is given below.
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
But while adding principal policies to the role I am getting This policy contains the following error: Has prohibited field Principal For more information about the IAM policy grammar, see AWS IAM Policies
The version of aws cli I am using is aws-cli/1.18.211 Python/3.8.7 Darwin/17.2.0 botocore/1.19.51