Amazon Elastic Container Service (Amazon ECS) is a regional container
orchestration service like Docker that allows to execute, stop, and manage
containers on a cluster.
A container is a standard unit of software development that combines code, its
dependencies, and system libraries so that the application runs smoothly from one
environment to another.
Images are created from a Dockerfile (text format), which specifies all of the
components that are included in the container. These images are then stored in a
registry from where they can then be downloaded and executed on the cluster.
All the containers are defined in a task definition that runs a single task or tasks
within a service. The task definitions (JSON format) defines which container images
should run across the clusters. A service is a configuration that helps to run and
maintain several tasks simultaneously in a cluster.
ECS cluster is a combination of tasks or services that can be executed on EC2
Instances or AWS Fargate, a serverless compute for containers. When using
Amazon ECS for the first time, a default cluster is created.
The container agent runs on each instance within an Amazon ECS cluster. It sends
data on the resource's current running tasks and resource utilization to Amazon
ECS. It starts and stops the tasks whenever it receives a request from Amazon
ECS.
A task is the representation of a task definition. The number of tasks to run on your
cluster is specified after the task definition is created within Amazon ECS. The task
scheduler is responsible for attaching tasks within your cluster based on the task
definitions.