Training AWS - Module 10 - Elastic Container Service
Training AWS - Module 10 - Elastic Container Service
What is ECS?
• Highly scalable, high performance container management system.
• Eliminates the need to install, operate and scale your own container
management system
EC2
instances
ECS
Container
ECS
Services
8/9/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 5
Module 10: ECS
Types of ECS?
• EC2:
• Users/Administrators have to manage, provision, scaling, monitoring underlying EC2s
• More control over the underlying infrastructure
• Fargate:
• Serverless
• Users/Administrators don't have to manage the underlying infrastructure, only need to
define the workload for container services.
• More expensive compares to using EC2 type
Components in ECS?
• ECS Cluster:
• Is made up of one or more EC2 instances
• Each cluster instance runs one or more services
• ECS Service:
• A Service controls things like the number of copies of a Task you want running
• Register service with a load balancing
• ECS Task Definition:
• Controls things like which container image will be run, environment variable, resource
allocation, and logging, ...
ECS Task
An instance of a Task
Definition, running the
containers detailed within
it. Multiple Tasks can be
created by one Task
Definition, as demand
requires.
ECS Service
• This is the logical level for application service
• Defines the minimum and maximum Tasks from one Task Definition,
autoscaling, and load balancing.
• Autoscaling: define minimum, maximum Tasks (container group defined in the Task
Definition), and scaling policy.
ECS Service
• Now that we have our Service, its Tasks need to run somewhere in
order to be accessible. It needs to be put on a Cluster, and the
container management service will handle it running across one or
more ECS Container Instance(s).
• It needs EC2 instance that has Docker and ECS container Agent running on it.
• The Agent takes care of the communication between ECS and the instance, providing
the status of running containers and managing running new ones.
ECS Cluster
• Cluster is a group of ECS Container Instances
• A Cluster can run many Services
ECS Architecture
Service A
taskdefinition
Service B
taskdefinition
Service C
taskdefinition
Awsvpc Bridge
Host mode
ECS Container
ECS Service
Target Group
8/9/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 24
Module 10: ECS
ECS Monitoring
• You can monitor your Amazon ECS resources using CloudWatch
• Amazon ECS metric data is automatically sent to CloudWatch in 1-minute periods
• CloudWatch Container Insight: enable on cluster level
• ECS can logs amazon ECS API calls with CloudTrail
• You can use a sidecar agent container for collecting logs, metrics,
and telemetry data. (example: AWS Distro for OpenTelemetry)
Thank you!!!