My team member wrote a lambda function that connects to a mem cache in AWS ElastiCache. memjs is a npm package.
const memjs = require("memjs");
const client = memjs.Client.create(`${CACHE_ADDRESS}:${CACHE_PORT}`);
where CACHE_ADDRESS / CACHE_PORT are environment variables in the lambda.
My Route53 record routing policy is simple & Type = CNAME and the hosted zone in this example is stackoverflow.com . Leading to the cache_address being myroute53address.stackoverflow.com
When I test the lambda through postman it gives me an error
getaddrinfo ENOTFOUND myroute53address.stackoverflow.com at GetAddrInfoReqWrap
I was wondering if I need to give the Lambda an access policy or something to access that hosted zone?