RealCloudCost

aws / containers / fargate vs ec2

Fargate vs EC2: which costs less

For six tasks of 1 vCPU and 2 GB, EC2 costs $0.00 a month, $0 less than Fargate.

aws list prices · checked 17 november 2026 · sources

Start from a typical setup then change anything in the form below

spec sheet use1-6x1-m7g.xlargechecked 2026-11-17

six tasks US East (N. Virginia)

  1. 01Fargate [1]$0.00cheapest
  2. 02EC2 instances [2]$0.00cheapest
Cheapest, a month$0.00

a year $0

setup formyou write in blue

Your setup change any box, the sheet follows

Tasks running

the sheet on the right updates as you writethe sheet above updates as you write

What decides it

At on-demand prices, it is close. A full instance and the same tasks on Fargate cost about the same per hour. EC2 loses when instances sit half empty or their memory does not match the tasks (the system keeps part of it), and pulls ahead with Savings Plans, Reserved Instances or Spot, which this sheet does not count.

Fargate wins on bursty or small work. Fargate bills each task by the second and needs no spare capacity. A handful of small tasks, or work that runs a few hours a day, often costs less there.

Count the time you spend. EC2 nodes need patching, scaling and capacity planning. The difference on this sheet is what that work has to be worth to you.

Sources

  1. [1]Fargate vCPU, memory and ephemeral storage prices, x86 and Arm, by region. AWS Price List API, AmazonECS offer, version 20261111234623, read 2026-11-17.
  2. [2]EC2 on-demand Linux prices. AWS Price List API, AmazonEC2 offer, read 2026-11-17.

Tasks and instances run all month, 730 hours, Linux on-demand, in USD before tax, Savings Plans, Spot, credits or private discounts. Instances give all their vCPU to tasks and keep 8 % of their memory for the system and the ECS agent. Fargate runs on the same architecture as the instance type. Disks and data transfer are not counted on either side. The calculator runs in your browser; nothing you type is sent anywhere.