What is a Service?
An ECS service is designed to maintain a specified number of task instances running at all times. Suppose you have a simple Python application and require two running instances (or containers) at all times. By configuring the ECS service with the desired count of two, the service guarantees that exactly two instances of your application are active. If no instances are running when the service is initiated, it will launch two new instances and deploy them across the available servers within the cluster.ECS services constantly monitor the running tasks. If any container crashes or stops unexpectedly, the service will automatically restart the affected container. This self-healing feature ensures that the intended number of instances is maintained, providing continuous availability for your application.