Skip to content
IAM Policy Generator

IAM policy example: read EKS cluster details for kubeconfig, with a least privilege rewrite

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

  1. Allow 74 actions (eks:*) on every resource.

    Action or patternActionsAccess levels
    eks:*74List 14, Read 20, Write 38, Tagging 2

Checks

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

  1. Allow 1 action (eks:DescribeCluster) on arn:aws:eks:us-east-1:111122223333:cluster/prod-cluster.

    Action or patternActionsAccess levels
    eks:DescribeCluster1Read 1
  2. Allow 1 action (eks:ListClusters) on every resource.

    Action or patternActionsAccess levels
    eks:ListClusters1List 1

Checks

No flags from the six checks.

Sources

  1. Amazon EKS User Guide: IAM roles for service accounts, read 16 Nov 2026
  2. AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026

Last reviewed 16 Nov 2026.