A pod configured for IRSA runs `aws sts get-caller-identity` and gets the node role (`eks-node-group-role`) instead of its own role
BeginnerTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer
Likely causes → The ServiceAccount has no eks.amazonaws.com/role-arn annotation, the pod uses a different SA, or the pod was created before the annotation was added. The pod identity webhook only injects at pod creation. Without the injected env vars, the SDK falls back to the node's instance profile.
Diagnose →
kubectl get sa api -n prod -o yaml | grep role-arn
kubectl exec deploy/api -- env | grep -E 'AWS_ROLE_ARN|AWS_WEB_IDENTITY_TOKEN_FILE'
Fix → Annotate the SA, then run kubectl rollout restart deploy/api.
Prevent → Block pod access to IMDS (Q130) so a missing annotation fails loudly instead of silently borrowing node permissions.
More on Cloud identity: IRSA, Workload Identity and CI OIDC
`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`IntermediateWith EKS Pod Identity, the pod gets `Unable to locate credentials` even though a pod identity association existsIntermediate`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