An IRSA role has `s3:GetObject` on the bucket, the policy simulator says allowed, yet the pod gets `AccessDenied`
AdvancedTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer
Likely causes → A deny or a missing grant in another policy layer. The bucket policy may deny unless aws:SourceVpce matches, the object may be SSE-KMS encrypted and the role lacks kms:Decrypt, a VPC endpoint policy may restrict buckets, or the object may be owned by another account with ACLs.
Diagnose →
aws s3api get-bucket-policy --bucket data-prod | jq -r .Policy | jq .
aws s3api head-object --bucket data-prod --key path/file # ServerSideEncryption, SSEKMSKeyId
aws ec2 describe-vpc-endpoints --filters Name=service-name,Values=com.amazonaws.ap-south-1.s3 --query 'VpcEndpoints[].PolicyDocument'
CloudTrail's errorMessage for the call often names the layer.
Fix → Grant kms:Decrypt on the key (and add the role to the key policy if needed). Align the bucket and endpoint policies, and set Object Ownership to BucketOwnerEnforced.
Prevent → Test access paths end to end from inside the cluster in CI, not just in the simulator, which does not evaluate every layer.
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`IntermediateWith EKS Pod Identity, the pod gets `Unable to locate credentials` even though a pod identity association existsIntermediate