getting this error while creating EKS cluster in AWS. does anyone have any idea why im getting this error ?
error : 2024-10-13 07:03:39 [] AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – “Resource handler returned message: "User: arn:aws:iam::891377079266:user/kk_labs_user_606785 is not authorized to perform: iam:PassRole on resource: arn:aws:iam::891377079266:role/eksctl-test-cluster-2-cluster-ServiceRole-wtcQKJA3PHdv (Service: Eks, Status Code: 403, Request ID: 69b897f6-0874-4966-ae4c-61e27a455b31)" (RequestToken: 702bb73f-12ca-d09b-a2be-ad14e6d68d7a, HandlerErrorCode: AccessDenied)”
command i have given :
eksctl create cluster --name= test-cluster `
–region us-east-1
--vpc-private-subnets subnet-0b3668b81748a3f81,subnet-09948d44c3e66d31f
–vpc-public-subnets subnet-0dfc63be34fc18d64,subnet-0d780983ca98c1508 `
–fargate
troubleshooting steps done :
- used only east1a,1b regions subnets as suggested by some other answer.
- added EKS and cloudformation roles
if anyone has any leads let me know.
FYI, im able to create cluster through GUI in AWS.