With EKS Pod Identity, the pod gets `Unable to locate credentials` even though a pod identity association exists
IntermediateTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer
Likely causes → The eks-pod-identity-agent add-on is not installed or not running on that node, the pod predates the association, or the role trust policy is written for IRSA instead of Pod Identity.
Diagnose →
aws eks list-pod-identity-associations --cluster-name prod --namespace prod
kubectl get ds -n kube-system eks-pod-identity-agent
kubectl exec deploy/api -- env | grep AWS_CONTAINER_CREDENTIALS_FULL_URI
Fix → Install the add-on and restart the pod. The trust policy must be:
{ "Effect": "Allow",
"Principal": { "Service": "pods.eks.amazonaws.com" },
"Action": ["sts:AssumeRole", "sts:TagSession"] }
Prevent → Pick one mechanism per cluster (Pod Identity for new EKS clusters) and manage associations in Terraform.
More on Cloud identity: IRSA, Workload Identity and CI OIDC
A pod configured for IRSA runs `aws sts get-caller-identity` and gets the node role (`eks-node-group-role`) instead of its own roleBeginner`An error occurred (AccessDenied) when calling the AssumeRoleWithWebIdentity operation: Not authorized to perform sts:AssumeRoleWithWebIdentity` from an IRSA podIntermediate`InvalidIdentityToken: No OpenIDConnect provider found in your account for https://oidc.eks.ap-south-1.amazonaws.com/id/ABC123`BeginnerIRSA env vars are present in the pod, but one legacy service still uses the node roleIntermediatePods without IRSA can still call AWS with the node's permissions through `169.254.169.254`Intermediate`aws-actions/configure-aws-credentials` fails with `Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers`Beginner