Getting below error when running simple nodejs code to fetch a file from AWS s3 bucket. Running this code in an existing EKS cluster but in a new Fargate profile.
This NodeJS code/image is working fine in two lower environments, but the pods are failing in one of the higher environment.
Tried almost everything what the Google world is suggesting, changed the nodejs base alpine image to latest but still same issue.
Same code/image is working fine if I deploy that in same existing EKS cluster but in a managed worker node, not sure why this is not working in Fargate profile.
Also tried to delete the Fargate profile and recreated, but same issue.
Also checked the sts VPC endpoint, Fargate pod execution role, security group and so on.. but no luck.
Tried aws sdk to 3.438.0 and 3.441.0, but no success.
Please help and suggest, what else can we try?
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
Error: getaddrinfo EAI_AGAIN sts.us-east-2.amazonaws.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'sts.us-east-2.amazonaws.com',
'$metadata': { attempts: 1, totalRetryDelay: 0 }
}
Node.js v21.1.0