AWS ECS concepts.

According to Amazon, ECS or Elastic Container Service is “a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers on a cluster of Amazon EC2 instances”. In this post I will cover some of the main features of AWS ECS including clusters, tasks and services.


Clusters in ECS are a logical grouping of tasks and services. Another way to put it is it is a group of EC2 instances that run docker containers.

Task definition

A task definition is a JSON file that defines the configuration of (up to 10) the containers you want to run. Think of it as a blueprint of your application. It is required to run Docker containers in ECS.


A task is an instance of a task definition. It launches containers defined in the task definition and runs only for the duration of the workload. You can use a task to run cron jobs.


A service is similar to a task in that it launches containers defined in a task definition. Services run and maintain instances of task definitions, making them suitable for running long running applications such as web servers.

Container Agent

The container agent allows containers to connect to your cluster and monitors tasks. It is responsible for starting and stopping tasks when necessary.


Amazon ECS is a useful AWS service to use to deploy docker containers. To get the most out of ECS, one must understand how Docker containers are defined and controlled in AWS. In a future post, I will show how to create clusters, task definitions, tasks and services in the AWS Console as well as through the CLI and using code.