An app using IRSA fails with `AccessDenied: Not authorized to perform sts:AssumeRoleWithWebIdentity`.
AdvancedTroubleshootingEKS-specific issues
Answer
Likely causes → The role's trust policy does not match the token: wrong OIDC provider ID (cluster recreated), the IAM OIDC provider is missing, or the sub condition names a different namespace or ServiceAccount (system:serviceaccount:payments:api).
Diagnose →
aws eks describe-cluster --name prod --query 'cluster.identity.oidc.issuer' --output text
aws iam list-open-id-connect-providers
aws iam get-role --role-name payments-api --query 'Role.AssumeRolePolicyDocument'
kubectl get sa api -n payments -o jsonpath='{.metadata.annotations.eks\.amazonaws\.com/role-arn}{"\n"}'
Fix → Create the IAM OIDC provider for the cluster and correct the trust policy:
"Condition": {"StringEquals": {
"oidc.eks.ap-south-1.amazonaws.com/id/ABC123:sub": "system:serviceaccount:payments:api",
"oidc.eks.ap-south-1.amazonaws.com/id/ABC123:aud": "sts.amazonaws.com"}}
Prevent → Generate IRSA roles with the cluster in IaC, or switch to EKS Pod Identity, which has no per-cluster OIDC trust to maintain.
More on EKS-specific issues
A new engineer gets `error: You must be logged in to the server (Unauthorized)` on EKS even though their IAM role is in `aws-auth`.IntermediateAfter someone edited `aws-auth`, all nodes went `NotReady` and nobody except the cluster creator can use kubectl.AdvancedA managed node group fails with `NodeCreationFailure: Instances failed to join the kubernetes cluster`.IntermediatePods are stuck in ContainerCreating and the aws-node logs show `InsufficientFreeAddressesInSubnet` / `failed to assign an IP address to container`.AdvancedAfter enabling prefix delegation (`ENABLE_PREFIX_DELEGATION=true`), nodes still cap at 29 Pods.IntermediatePods on EKS fail to pull from ECR with `failed to resolve reference ... 401 Unauthorized` or `no basic auth credentials`.Intermediate