Configuring ECS service discovery resources
ECS service discovery is a feature that allows your client applications to discover ECS services in a dynamic environment, where container-based endpoints come and go. To date, we have used AWS application load balancers to perform this function, where you configure a stable service endpoint that your applications can connect to, with connections then load balanced across an ECS-managed target group that includes each of the ECS tasks associated with your ECS service. Although this is generally my recommended best practice approach, for applications that don't support load balancers (for example, UDP-based applications), or for very large microservice architectures where it is more efficient to have direct communication with a given ECS task, ECS service discovery may be a better approach than using load balancers.
Note
ECS service discovery also supports AWS load balancers, where ECS will publish the IP address of the load balancer listener if...