I am trying to make 2 service communicate over service discovery endpoint in AWS ECS service.
Service1: runs the Task Definition to run nginx and phpfpm
Service2: runs the Task Definition to run redis
Now, I need to make service1 container communicate to service2
As per the documentations and resource found on internet. This is what I have done and not able to achieve the need.
- We need to turn on service discover (Done)
- Set proper service name and namespace which will work as service discovery endpoint (Done)
- Create task definition and create service with above property set (done)
- Now AWS will generate a SRV records on the Route53 (OK)
Now, when using the service discovery endpoint which is generally in format
The error logs shows , It’s not able to resolve the name.