Interview Prep/DevSecOps/Cloud identity: IRSA, Workload Identity and CI OIDC

Pods in a private EKS cluster hang and then fail with `dial tcp 52.94.x.x:443: i/o timeout` when the SDK calls STS

AdvancedTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer

Likely causes → The nodes have no NAT route, and there is no STS VPC endpoint, or the SDK targets the global endpoint sts.amazonaws.com, which the regional interface endpoint does not serve.

Diagnose →

kubectl exec deploy/api -- env | grep AWS_STS_REGIONAL_ENDPOINTS
aws ec2 describe-vpc-endpoints --filters Name=service-name,Values=com.amazonaws.ap-south-1.sts
kubectl exec deploy/api -- nslookup sts.ap-south-1.amazonaws.com

Fix → Create an interface endpoint for com.amazonaws.<region>.sts with private DNS enabled, and set AWS_STS_REGIONAL_ENDPOINTS=regional (the IRSA webhook can inject this; current SDKs default to regional). Add endpoints for every other AWS API the app uses (ECR, S3 gateway, Secrets Manager, KMS).

Prevent → Keep a checklist of required VPC endpoints for private clusters and test with a pod that calls each service.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Cloud identity: IRSA, Workload Identity and CI OIDC