DEV Community

Said Olano
Said Olano

Posted on

AWS - How to create a role

To create an AWS role:

aws iam create-role --role-name eks-lab-role --assume-role-policy-document file://eks-Cluster-trust-policy.json
Enter fullscreen mode Exit fullscreen mode

Finally:

Add the policy:

aws iam attach-role-policy --role-name eks-lab-role --policy-arn arn:aws:iam::aws:policy/AmazonEKSClusterPolicy
Enter fullscreen mode Exit fullscreen mode

To verify:

Top comments (0)