Interview Q&A / AWS & Cloud

IntermediateQuick answer1 min readUpdated 3 Oct 2026

What is AWS Fargate and how is it different from running containers on EC2?

SHORT ANSWER

Fargate is a serverless way to run ECS or EKS containers where AWS manages the servers. With the EC2 launch type you own and patch the instances yourself, which gives more control and can be cheaper at steady high usage.

Explain it simply

Fargate is like booking a cab through an app: you say where you want to go and pay for the ride, and the driver and car are someone else's problem. The EC2 launch type is owning a car: more control and cheaper if you drive all day, but you handle fuel, servicing and parking.

Example

text
Fargate
  You specify : CPU and memory per task
  AWS handles : servers, OS patching, scaling the fleet
  Billing     : per task for the vCPU and memory you request, by the second
  Good for    : variable load, small teams, no desire to manage servers

EC2 launch type
  You manage  : instances, AMIs, patching, cluster capacity
  Extra       : GPUs, custom AMIs, privileged containers, daemon-style tasks
  Good for    : steady heavy workloads, special hardware, cost tuning

Each Fargate task runs in its own isolated environment with its own network interface. You cannot log in to the host because there is no host you control.

You can mix both in one ECS cluster using capacity providers, for example EC2 for the baseline load and Fargate for bursts.

What to say in the interview

"Fargate removes server management: I define task CPU and memory and AWS runs it. The EC2 launch type gives more control and often lower cost for steady workloads, but I must patch and scale the instances. I default to Fargate unless I need GPUs or the cost clearly favours EC2."

Common mistakes

  • Thinking Fargate has no servers at all. They exist, you just do not manage them.

#aws#fargate#ecs#containers

Related questions

Practise more AWS & Cloud questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open AWS & Cloud quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.