
AWS Fargate runs your containers without servers you can see, billed per second for the vCPU and memory each task requests, while EC2 gives you whole virtual machines billed for every second they are switched on, whether busy or idle. For a 10 to 250 person company the deciding difference is utilization: a job that runs a few hours a week is almost always cheaper on Fargate, and a service that runs flat out around the clock can be cheaper on EC2, but only if someone on your side patches and replaces those instances. People searching "amazon fargate vs ec2" usually mean exactly this choice as ECS capacity; the product's correct name is AWS Fargate.
Is Fargate a different kind of server from EC2?
Fargate is not a separate place to put any workload. It is a compute engine for containers that the ECS documentation calls serverless and pay-as-you-go, with no servers to manage, no capacity planning and no need to isolate container workloads yourself. Amazon ECS and AWS Batch can run tasks on it, and Amazon EKS can run pods on it. EC2 can do everything Fargate does plus run ordinary servers, databases and desktop-style applications.
| Factor | AWS Fargate | Amazon EC2 |
|---|---|---|
| What you size | Each task: vCPU and memory from fixed combinations | Each instance: one of many instance types |
| Billing unit | Per second of task run time, 1-minute minimum (5 minutes for Windows) | Per second for Linux and Windows On-Demand, 60-second minimum |
| Largest unit | 32 vCPU and 244 GiB per Linux task | Full EC2 instance range |
| GPU | Not supported | Supported on GPU instance types |
| Host patching | AWS, through scheduled task retirement | Your team |
| Spot discount | Fargate Spot, up to 70 percent off | EC2 Spot Instances |
Rows come from the Fargate pricing page, the Fargate task definition reference and the EC2 user guide, as of December 2026.
The rates that drive the math
As of December 2026, the Fargate pricing page's US East (N. Virginia) examples use $0.000011244 per vCPU per second and $0.000001235 per GB of memory per second for Linux on x86, and $0.0000089944 and $0.0000009889 for Linux on ARM. Multiplied by 3,600, the x86 rates come to about $0.0405 per vCPU-hour and $0.0044 per GB-hour. Each task gets 20 GB of ephemeral storage before storage charges apply.
For EC2, AWS's EC2 On-Demand pricing page lists, for Linux in the same Region as of December 2026, t3.medium (2 vCPU, 4 GiB) at $0.0416 per hour and t3.xlarge (4 vCPU, 16 GiB) at $0.1664 per hour. The EBS pricing page lists gp3 storage at $0.08 per GB-month in US East (N. Virginia), as of December 2026.
Two workloads priced both ways
These examples are illustrative, use a 730-hour month, and leave out load balancers, data transfer and logs, which are the same or similar either way.
| Workload (US East, Linux, as of December 2026) | On Fargate | On EC2 |
|---|---|---|
| Steady web app: two copies, each 1 vCPU and 2 GB, running all month | About $0.0494 per task-hour, so about $72.08 for two tasks | Two t3.medium instances plus 30 GB gp3 each: about $65.54 |
| Weekly batch: one 4 vCPU, 16 GB job for 4 hours every Friday | About $0.233 per hour, so about $0.93 a run and roughly $4 a month | A t3.xlarge left running for it: about $121.47; stopped between runs, a few dollars plus the effort of starting and stopping it |
The steady app is close to a tie on the invoice, and the EC2 column needs a person to patch, replace and scale those two instances. The batch job is the clearest case for Fargate: the work is billed for four hours a week instead of a whole month. That is the pattern to look for in your own account: compute that sits idle most of the time.
Where AWS Fargate stops fitting
- GPU or very large tasks. No GPU, and nothing above 32 vCPU and 244 GiB per Linux task. Use EC2 capacity or ECS Managed Instances.
- Privileged containers or host-level tuning. The task definition reference lists privileged mode, custom DNS servers and several Linux options as unsupported on Fargate.
- Windows at small sizes. Windows tasks start at 1 vCPU, run on Windows Server 2019 or 2022 only, and carry a 5-minute billing minimum.
- Workloads that are not containers. A vendor application installed on Windows Server stays on EC2.
Amazon ECS on AWS Fargate vs EC2: the same choice, said differently
The search "amazon ecs fargate vs ec2" refers to the two ways to supply capacity to an ECS cluster: Fargate, where AWS runs the hosts, or EC2 instances that you register to the cluster and manage. ECS pricing makes no orchestration charge for either, so the comparison above holds. The operational difference is patching: AWS's Fargate task maintenance page explains that AWS retires old platform revisions to apply updates, gives a default 7-day notice that can be extended to 14 days, and replaces service tasks automatically, while standalone tasks are stopped and not relaunched. With EC2 capacity, the same updates are yours to schedule. A third option, ECS Managed Instances, sits between them: EC2 instance types with AWS handling patching for a management fee.
A recovery plan for each
On Fargate, recovery means keeping more than one task in a service, storing data outside the container (Amazon EFS, EBS volumes attached to tasks, or a database), and making sure standalone jobs alert when they did not complete. On EC2, add machine images, instance backups through AWS Backup and a tested rebuild. Either way, the database and files carry the real recovery risk; the AWS cost optimization guide also shows how to find idle EC2 capacity once the move is done.
If the work is a short event-driven job rather than a container, Amazon EC2 vs Lambda prices that option. If you are choosing between ECS and Kubernetes rather than between capacity types, read Amazon EC2 vs ECS and Amazon EC2 vs EKS first. To have your own workloads priced both ways from real usage, Scope my AWS workload.
More on this topic: AWS operations guides.
Frequently asked questions
Is AWS Fargate cheaper than EC2?
For work that runs part of the time, usually yes, because Fargate bills only the seconds a task runs. For a service that uses its full allocation around the clock, EC2 can cost slightly less on the invoice, as the worked example shows, but the saving has to pay for the time spent patching and replacing instances.
Amazon Fargate vs EC2: which name is correct?
AWS calls the product AWS Fargate. "Amazon Fargate" is a common way of typing it but not the official name. Fargate is used through Amazon ECS, Amazon EKS or AWS Batch rather than on its own.
Can Fargate tasks keep data when they stop?
Only if you attach persistent storage. The ECS documentation lists Amazon EBS volumes and Amazon EFS volumes for persistent data and bind mounts for ephemeral storage; anything written only to the task's ephemeral storage is gone when the task ends.
Does Fargate Spot make sense for a small business?
For interruptible work such as batch processing, test environments or queue workers, yes: AWS states a discount of up to 70 percent off the regular Fargate price, as of December 2026. Spot capacity can be reclaimed, so do not run a single customer-facing task on it.
Sources
Fargate, ECS and EC2 documentation and pricing pages from AWS, read on December 2, 2026:
Related reading
Discuss AWS Consulting for Business for your business.
Tell us about your current systems, the result you need and your timeline. We will discuss the work, responsibilities and pricing before you decide on an engagement.



