Amazon Elastic Container Service (ECS) (original) (raw)

Last Updated : 9 Jun, 2026

Amazon Elastic Container Service (ECS) is a managed container orchestration service provided by Amazon Web Services. It allows you to run, manage and scale Docker containers on AWS infrastructure without manually handling complex orchestration tools.

With ECS, you provide containerized applications, and AWS takes care of scheduling, deployment, monitoring, and maintaining availability. ECS supports two compute options:

Core Components

1. Task Definition

A Task Definition is a JSON blueprint that defines how containers should run in Amazon ECS.

**It includes details such as:

2. Task

A Task is a running instance of Task Definition.

**Key Points

3. Service

An ECS Service maintains the desired number of running Tasks and is commonly used for long-running applications like web servers and APIs.

**Main responsibilities:

4. Cluster

An ECS Cluster is a logical group of resources where ECS Tasks and Services run.

**It provides the infrastructure where Tasks run and manages:

**A Cluster can contain:

Working of ECS

Amazon ECS works by deploying Docker containers on AWS infrastructure and automatically managing their scaling, availability, and monitoring. ECS places containers on EC2 instances or AWS Fargate and keeps the required applications running based on the defined configuration.

AWS-ECS

Fargate vs. EC2

AWS ECS provides two launch types for running containers: AWS Fargate and EC2 Launch Type. Fargate is serverless and managed by AWS, while EC2 gives users full control over the underlying virtual machines and configurations.

Feature AWS Fargate EC2 Launch Type
Management AWS manages infrastructure User manages EC2 instances
Control Limited server control Full server and OS control
Pricing Pay per resource usage Pay for EC2 instances
Best For Web apps, microservices Custom workloads, GPUs
Maintenance Handled by AWS Managed by user

Amazon ECS Terminologies and Components

Amazon ECS includes different components that help in deploying, managing, and scaling containerized applications efficiently across AWS infrastructure.

1. Provisioning

**Provisioning tools help set up and manage ECS resources:

2. Controller

The ECS Scheduler manages and distributes tasks, balancing workloads and ensuring availability across clusters.

3. Capacity Options

**It supports different capacity options:

This structure offers flexibility and control for containerized applications in AWS and beyond.

amazon_ecs_terminology_and_components

Amazon ECS Terminology

Working of ECS Auto Scaling

ECS Auto Scaling automatically adjusts resources based on application demand to maintain performance and optimize cost.

**Task-level Scaling (Service Auto Scaling)

**Infrastructure-level Scaling (Cluster Auto Scaling)

Common Use Cases for ECS

Advantages

Ways to Provision and Manage ECS

You can interact with ECS using a variety of tools, catering to different workflows:

AWS CLI Commands for ECS

The AWS CLI provides granular control over every ECS resource. The following is a reference of available commands.

Capacity and Cluster Management

Service Management

Task Definition Management

Task Management

Container Instance Management

Account Settings

Attributes and Tags

State Change Notifications

Utility