How the ECS Scheduler Places & Replaces Tasks

~10 min read

What actually happens inside ECS when a service's desired count changes or a task fails.

How the ECS Scheduler Places & Replaces Tasks is a Pro topic

Sign in, then upgrade to Pro or Power to unlock this topic and the full AWS curriculum.

Key points

  • The scheduler continuously reconciles actual task count toward desired task count
  • Placement strategy 'spread' across AZs is the default resilience pattern on EC2 launch type
  • A failed health check triggers deregistration + termination + replacement, usually within a minute
  • Desired count should always account for at least N+1 capacity so one task failure never drops below traffic-serving minimum