# 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.

```json
{
  "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.

- Allows 74 actions (eks:*) on every resource.

Checks:
- medium: Allows 38 write or permissions-management actions on every resource ("Resource": "*"). (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)

The action eks:* covers 74 actions, including deleting a cluster and changing its access entries.

## Least privilege rewrite

```json
{
  "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.

- Allows 1 action (eks:DescribeCluster) on arn:aws:eks:us-east-1:111122223333:cluster/prod-cluster.
- Allows 1 action (eks:ListClusters) on every resource.

Checks:
- No flags.

- [Paste it into the workbench](/)
- [Every EKS action and its access level](/actions/eks/)

## Related pages

- [IAM policy example: invoke one Bedrock foundation model](/examples/bedrock-invoke-one-model/)
- [IAM policy example: invoke Bedrock models with streaming](/examples/bedrock-invoke-with-streaming/)
- [IAM policy example: let EC2 assume a role](/examples/trust-policy-ec2-instance-role/)
- [All of them](/examples/)

## Sources

- Amazon EKS User Guide: IAM roles for service accounts: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html (read 16 Nov 2026)
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026): https://docs.aws.amazon.com/service-authorization/latest/reference/service-reference.html (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://iampolicygenerator.com/examples/eks-describe-cluster-for-kubeconfig/

This site is not affiliated with Amazon Web Services. AWS service and product names are used only to describe AWS services.
