Amazon ECS: one control plane, five places to run

Amazon ECS: one control plane, five places to run An architecture diagram generated by Archify. You · AWS CLI / CDK / Terraform · Architecture component You AWS CLI / CDK / Terraform ECS API + Scheduler · AWS-managed, no cost · AWS Region (us-east-1) · RegisterTaskDefinition ECS API + Scheduler AWS-managed, no cost RegisterTaskDefinition Task definition · image, CPU/memory, IAM roles, logging · AWS Region (us-east-1) Task definition image, CPU/memory, IAM roles, logging Amazon ECR · container images · AWS Region (us-east-1) Amazon ECR container images Application Load Balancer · target group per service · AWS Region (us-east-1) Application Load Balancer target group per service ECS Service · desired count, rollout, autoscaling · AWS Region (us-east-1) · CreateService ECS Service desired count, rollout, autoscaling CreateService ECS Express Mode · one API call, opinionated defaults · AWS Region (us-east-1) ECS Express Mode one API call, opinionated defaults AWS Fargate · serverless tasks · AWS Region (us-east-1) AWS Fargate serverless tasks ECS Managed Instances · AWS-operated EC2 fleet · AWS Region (us-east-1) ECS Managed Instances AWS-operated EC2 fleet ECS on EC2 · your ASG, your AMI · AWS Region (us-east-1) ECS on EC2 your ASG, your AMI ECS Anywhere · your servers, on-premises · Architecture component · SSM Agent + ECS Agent ECS Anywhere your servers, on-premises SSM Agent + ECS Agent RegisterTaskDefinition / CreateService stores the immutable revision service runs N copies of one revision image pulled at task launch routes to task ENIs createExpressService launchType: FARGATE capacity provider: managed instances launchType: EC2 launchType: EXTERNAL AWS Region (us-east-1) Legend Backend Cloud External

The control plane is free

  • • The ECS API and scheduler cost nothing
  • • You pay only for the compute your tasks land on
  • • That is the whole pricing model - no cluster fee

One task definition, five destinations

  • • The same revision can target FARGATE, EC2 or EXTERNAL
  • • Express Mode wraps the whole thing in a single call
  • • Managed Instances is chosen by capacity provider, not launch type

Where the agent lives

  • • EC2, Managed Instances and external hosts run the ECS Agent
  • • Fargate and Express Mode hide the agent completely
  • • No agent visible means no host for you to operate