IAM policy example: read EKS cluster details for kubeconfig, with a least privilege rewrite
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
Allows a developer to look up one EKS cluster and list clusters, which is what the CLI needs to write a kubeconfig. It grants no Kubernetes permissions. The original allows eks:* on all clusters. The names and the account ID 111122223333 are AWS documentation placeholders.
Open the workbench ยท All examples
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Eks",
"Effect": "Allow",
"Action": "eks:*",
"Resource": "*"
}
]
}
What it allows
- Allows every EKS action on all clusters, including creating and deleting clusters and node groups.
What it allows
Allow 74 actions (eks:*) on every resource.
Action or pattern Actions Access levels eks:*74 List 14, Read 20, Write 38, Tagging 2
Checks
- Medium Allows 38 write or permissions-management actions on every resource ("Resource": "*"). AWS documentation for this check
The action eks:* covers 74 actions, including deleting a cluster and changing its access entries.
Least privilege rewrite
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DescribeOne",
"Effect": "Allow",
"Action": "eks:DescribeCluster",
"Resource": "arn:aws:eks:us-east-1:111122223333:cluster/prod-cluster"
},
{
"Sid": "ListClusters",
"Effect": "Allow",
"Action": "eks:ListClusters",
"Resource": "*"
}
]
}
The rewrite grants DescribeCluster on one cluster and ListClusters. Cluster changes are removed. Access inside the cluster is set by Kubernetes roles.
What it allows
Allow 1 action (eks:DescribeCluster) on arn:aws:eks:us-east-1:111122223333:cluster/prod-cluster.
Action or pattern Actions Access levels eks:DescribeCluster1 Read 1 Allow 1 action (eks:ListClusters) on every resource.
Action or pattern Actions Access levels eks:ListClusters1 List 1
Checks
No flags from the six checks.
Related pages
Sources
- Amazon EKS User Guide: IAM roles for service accounts, read 16 Nov 2026
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026
Last reviewed 16 Nov 2026.