0%
AWS in Practice: Services, Limits, and Failure Modes
Account Foundations
Storage
Databases
Networking
Delivery and Visibility
Limits, Cost and Recovery
ECS, EKS and Fargate Compared
AWS offers two container orchestrators and a way to run either of them without managing servers, and the naming makes the choice look more complicated than it is. Elastic Container Service, ECS, is AWS's own orchestrator, with its own API and concepts. Elastic Kubernetes Service, EKS, runs upstream Kubernetes with a managed control plane. Fargate is not a third orchestrator: it is a serverless way to run the compute underneath either of them, so that each task or pod gets its own isolated slice of capacity without any EC2 instances to manage. A container platform on AWS is therefore a pair of choices, an orchestrator and a compute type, and the right pair depends on the team more than on the workload.
The two decisions
The first decision is which orchestrator schedules and manages containers. ECS is simpler, tightly integrated with other AWS services, and has no control plane charge. EKS is Kubernetes, with its ecosystem of tools, operators, Helm charts and portable skills, and with the operational weight that comes with them. The second decision is where containers run: on EC2 instances the team manages, through capacity providers or managed node groups; on Fargate, where AWS manages the hosts; or, for EKS, through Karpenter or Auto Mode, which manage EC2 instances on the team's behalf. These choices are independent: ECS on EC2, ECS on Fargate, EKS on EC2 and EKS on Fargate are all common.
What ECS gives you
ECS has a small number of concepts: clusters, task definitions, tasks and services. A task definition describes one or more containers, their images, CPU and memory, ports, environment, secrets and IAM role. A task is a running instance of a task definition. A service keeps a desired number of tasks running, replaces failed ones, registers them with a load balancer and rolls out new task definition revisions. Clusters group capacity. There is no control plane to upgrade, no add ons to keep compatible and no separate API server to secure. IAM controls who can do what, CloudWatch receives logs and metrics, and the same CloudFormation, CDK or Terraform that defines the rest of the account defines the services.
The price of that simplicity is that ECS is AWS only. Skills, tools and manifests do not move to another cloud or to an on premises cluster, and the ecosystem of third party operators is far smaller than Kubernetes'.
What EKS gives you
EKS runs a managed Kubernetes control plane: API servers and etcd spread across three Availability Zones, upgraded and patched by AWS, for a flat hourly charge per cluster. Everything else is Kubernetes as usual: Deployments, Services, Ingress, operators, Helm, Argo CD, admission controllers and the rest of the ecosystem. Teams that already know Kubernetes, that need tools only Kubernetes offers, or that run the same platform in several environments get a great deal from it.
The cost is operational. Kubernetes releases a new minor version roughly every four months, and EKS supports each for a limited period before extended support, which carries a much higher hourly charge. Every cluster therefore needs regular upgrades, and every add on, from the VPC CNI and CoreDNS to ingress controllers and service meshes, needs to stay compatible. Cluster networking, IAM integration for pods and node management are additional layers to learn and run.
What Fargate gives you
Fargate runs each ECS task or EKS pod in its own isolated micro VM, sized to the CPU and memory the task requests. There are no instances to choose, patch, scale or bin pack. Billing is per second for the requested vCPU and memory while the task runs. Scaling becomes a matter of how many tasks to run, and capacity planning disappears from the team's work.
Fargate's constraints are real. There are no GPUs, no privileged containers and no daemon sets on EKS, so agents that would run once per node must run as sidecars in every pod. Task sizes are fixed combinations of vCPU and memory up to sixteen vCPU and one hundred and twenty gigabytes. Startup is slower than placing a container on a warm instance, because each task gets a fresh environment and pulls its image. And per unit of compute it costs more than well utilised EC2.
Who runs what
A useful way to compare the options is to list what the team operates in each. With ECS on Fargate, the team owns task definitions, service configuration and images; AWS owns the scheduler, hosts and their patching. With ECS on EC2, the team adds the instances: AMIs, patching, scaling and bin packing. With EKS on Fargate, the team adds cluster upgrades and Kubernetes add ons. With EKS on EC2, the team owns all of it, though managed node groups, Karpenter and EKS Auto Mode each take back part of the load.
A default for most teams
For a team without strong Kubernetes experience or requirements, ECS on Fargate is the lowest operational burden and a sensible default. Moving to EC2 capacity providers later, for cost or for GPU workloads, changes the compute without changing the services. EKS earns its overhead when the team already runs Kubernetes elsewhere, needs operators or tools that only exist for Kubernetes, wants portability across clouds, or runs a large shared platform where Kubernetes' extensibility pays off. Choosing EKS because it is popular, without one of those reasons, usually means paying for upgrades and add ons that deliver nothing the team uses.
App Runner and Lambda nearby
Two other services sit close to this decision. App Runner runs a container from an image or source repository behind a managed HTTPS endpoint with automatic scaling, with very little configuration, and suits simple web services that do not need the control ECS offers. Lambda can run container images too, up to ten gigabytes, with Lambda's execution model and limits. For a single stateless HTTP service with modest traffic, either can be simpler than a cluster. As soon as there are many services, background workers, service to service networking or tuning needs, ECS or EKS becomes the better home.
Migration between them
Moving between ECS and EKS is a real project, not a configuration change: task definitions become Deployments, services become Services and Ingresses, IAM task roles become pod identity associations, and deployment pipelines change. Moving between EC2 and Fargate within one orchestrator is much easier, often a change of capacity provider or a Fargate profile. That asymmetry is a reason to choose the orchestrator carefully and the compute type pragmatically, revisiting the second as workloads and prices change.
Questions that settle the choice quickly
In practice, a few questions decide most cases. Who will be on call for the platform, and what do they already know? A team of Kubernetes operators will run EKS better than ECS, and a team of application developers will run ECS better than EKS. How many services and teams will share it? A handful of services rarely justifies Kubernetes' extensibility, while a platform for fifty teams may. Are there workloads that need GPUs, host access or per node agents? Those push toward EC2 capacity for at least part of the platform. And how much does portability actually matter, measured by plans to run elsewhere rather than by a general wish to avoid lock in? Portability that is never used is paid for in upgrades every few months.
The cost of the control plane itself
ECS has no charge for clusters or the scheduler; the bill is only for the compute and surrounding services. EKS charges a flat hourly rate per cluster for standard support, which is small for one production cluster and noticeable for dozens of per team or per environment clusters, and several times higher for clusters on versions in extended support. The control plane charge is rarely the deciding factor, but a design that creates a cluster per developer or per pull request should account for it, and for the upgrade work each cluster brings.
ECS and EKS schedule containers. EC2 and Fargate run them. ECS is simpler and AWS only, EKS brings Kubernetes and its upgrade treadmill, and Fargate removes hosts at a higher unit price with no GPUs or daemon sets. ECS on Fargate is the lowest burden default, and EKS earns its overhead when Kubernetes itself is a requirement.