Interview Prep/AWS/ECS, EKS, Lambda and ECR

ECS on Fargate or on EC2: how do you choose?

BeginnerScenarioECS, EKS, Lambda and ECR
Answer

Situation read → Fargate removes host management; EC2 gives control and cost optimization at scale.

What I'd do →

  1. Choose Fargate for most services, bursty workloads and small teams
  2. Choose EC2 for GPUs, large steady fleets with Savings Plans, privileged containers or daemon sets
  3. Use capacity providers to mix both
  4. Compare per vCPU-hour cost

Why → Fargate trades roughly 20 to 30 percent premium for no patching.

Interview tip → Say "Fargate by default, EC2 when numbers justify".

aws All AWS questions Roadmap: EKS, ECS & serverless on AWS

More on ECS, EKS, Lambda and ECR