Skip to content
Least Privilege Principle

Least privilege for Amazon EKS means namespace-scoped access policies and one role per service account

Amazon EKS has two layers: AWS IAM decides who can call the EKS API, and Kubernetes permissions decide what they do inside the cluster. AWS documentation read on 16 Nov 2026 describes access entries scoped to namespaces and Pod Identity for pods. This guide shows a view-only namespace grant.

Open the calculator ยท All services

EKS access entries map IAM principals to Kubernetes permissions

AWS documentation says you can associate one or more access policies with access entries of type STANDARD. EKS access policies contain Kubernetes permissions, not IAM permissions. Access entries also let you modify or revoke the cluster-admin access given to the cluster creator.

The four access policies AWS lists are AmazonEKSAdminPolicy, AmazonEKSClusterAdminPolicy, AmazonEKSEditPolicy and AmazonEKSViewPolicy. If a principal has several policies, it receives all permissions in all of them. Each policy can be associated with an access entry only once, and each association carries its own scope, so a principal can hold view access cluster-wide and admin access in one namespace.

The identities that call this service (people, services, workloads, third parties) are covered in the AWS service identities guide and the workload identities guide.

Cluster-wide scope and creator admin are the grants to avoid

  • A cluster-scoped association of AmazonEKSClusterAdminPolicy or AmazonEKSAdminPolicy when a namespace scope would do. AWS says an access policy can be scoped to all resources or to named namespaces, including wildcards such as dev-*.
  • Leaving the cluster creator with cluster-admin. AWS says access entries let you modify or revoke it.
  • Running pods with access to the node role. AWS says that if IMDS is not restricted, a pod can reach the node IAM role and may reach the roles of other pods.
  • Sharing one role across all workloads. AWS says Pod Identity lets you scope IAM permissions to a service account, so only pods using it get them.

A view-only grant for two namespaces uses one CLI call

AWS documents associating AmazonEKSViewPolicy with a role for named namespaces. The principal needs ListAccessEntries, DescribeAccessEntry, UpdateAccessEntry, ListAccessPolicies, AssociateAccessPolicy and DisassociateAccessPolicy to manage associations.

ItemValue from the AWS example
Access policyarn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy
Commandaws eks associate-access-policy
Principalarn:aws:iam::111122223333:role/my-role
Access scopetype=namespace,namespaces=my-namespace1,my-namespace2
Widen laterRe-run with type=cluster; remove a namespace by re-running without it

Pod Identity and credential isolation narrow what a workload can obtain

AWS says each EKS Pod Identity association maps one IAM role to one service account in a namespace, and a service account can be associated with one role from the cluster account. Identical associations can be made in several clusters without editing the role trust policy. Up to 5,000 associations per cluster are supported.

AWS also says containers are not a security boundary: pods on the same node share a kernel. Pods with hostNetwork set to true always have IMDS access, even though SDKs use Pod Identity credentials when enabled.

List associations and read CloudTrail to see what is granted and used

Run aws eks list-associated-access-policies to see each policy and its scope for a principal. AWS warns that kubectl auth can-i --list does not show permissions granted by access policies, and that impersonating a user with --as forces Kubernetes RBAC so access policy permissions no longer apply.

AWS lists access and event logging through CloudTrail as the Pod Identity audit source. Use IAM Access Analyzer policy generation on a pod role to compare granted and used actions, and review the access entries list after each team change.

Sources

  1. Access entries, read 16 Nov 2026
  2. Associate access policies with access entries, read 16 Nov 2026
  3. EKS Pod Identity, read 16 Nov 2026
  4. IAM Access Analyzer policy generation, read 16 Nov 2026

Last reviewed 16 Nov 2026.