liveBook · Manning

ECS service

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

An ECS service is an Amazon ECS resource that maintains a specified number of running tasks and can register them with load balancers.

An ECS service keeps multiple tasks of the same kind running. It maintains the desired task count, replaces failed tasks, distributes tasks across Availability Zones, and coordinates rolling updates. section 18.3 section 18.6

An ECS service can:

  • Run several copies of an application task continuously. section 18.3
  • Scale the desired task count in response to load such as CPU utilization. section 18.3 section 18.5
  • Register tasks with a load balancer and distribute incoming requests across running containers. section 18.5 section 18.5
  • Deploy updates while maintaining healthy capacity and rolling back failed deployments. section 18.5

A service belongs to an ECS cluster and launches tasks from a task definition. A typical CloudFormation configuration selects Fargate, sets DesiredCount to 2, connects the application container to a target group, and defines health-check and deployment settings. section 18.3 section 18.5

Notea web application

A Notea deployment uses an Application Load Balancer, an ECS service, Fargate compute, and S3 storage. The service starts two application tasks, scales them based on CPU load, and exposes the application through the load balancer. section 18.5

Figure 18.4 An ECS service manages multiple tasks of the same kind.

Shows how an ECS service manages multiple tasks of the same kind. section 18.3

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains responsibilities and CloudFormation configuration, including desired count, load balancing, health checks, and CPU scaling.
Examples
Uses the Notea application, two desired tasks, CPU-based scaling, Fargate, an Application Load Balancer, and S3.
What it assumes
Assumes familiarity with containers and introduces ECS clusters, task definitions, tasks, and services as related components.
What you can do after
Operate/configure a replicated ECS application with CloudFormation, load balancing, Fargate capacity, and CPU-based autoscaling.
How it connects
Connects ECS clusters, task definitions, tasks, Fargate, Application Load Balancers, CloudFormation, and S3.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.