Elastic Container Service
Virtualisation Problems

Containerization

Image Anatomy

Container Anatomy

Container Registry





Serverless with AWS Fargate – managed for you and fully scalable
Fully managed container orchestration – control plane is managed for you
Docker support – run and manage Docker containers with integration into the Docker Compose CLI
Windows container support – ECS supports management of Windows containers
Elastic Load Balancing integration – distribute traffic across containers using ALB or NLB
Amazon ECS Anywhere (NEW) – enables the use of Amazon ECS control plane to manage on-premises implementations
ECS is capable of running in EC2 mode or Fargate mode.
EC2 mode deploys EC2 instances into your AWS account which can be used to deploy tasks and services.
With EC2 mode you pay for the EC2 instances regardless of container usage
Fargate mode uses shared AWS infrastructure, and ENI's which are injected into your VPC
You pay only for container resources used while they are running.


ECS - EC2 Mode

ECS - Fargate Mode



EC2 vs ECS (EC2) vs Fargate

Auto Scaling for ECS
Two types of scaling:
Service auto scaling
Cluster auto scaling
Service auto scaling automatically adjusts the desired task count up or down using the Application Auto Scaling service
Service auto scaling supports target tracking, step, and scheduled scaling policies
Cluster auto scaling uses a Capacity Provider to scale the number of EC2 cluster instances using EC2 Auto Scaling

Service Auto Scaling
Amazon ECS Service Auto Scaling supports the following types of scaling policies:
Target Tracking Scaling Policies—Increase or decrease the number of tasks that your service runs based on a target value for a specific CloudWatch metric
Step Scaling Policies—Increase or decrease the number of tasks that your service runs in response to CloudWatch alarms. Step scaling is based on a set of scaling adjustments, known as step adjustments, which vary based on the size of the alarm breach
Scheduled Scaling—Increase or decrease the number of tasks that your service runs based on the date and time

Uses an ECS resource type called a Capacity Provider
A Capacity Provider can be associated with an EC2 Auto Scaling Group (ASG)
ASG can automatically scale using:
Managed scaling - with an automatically-created scaling policy on your ASG
Managed instance termination protection - which enables containeraware termination of instances in the ASG when scale-in happens
Amazon ECS with ALB

Last updated