Fargate Costs 2x What EC2 Does for the Same Container. Here Is When That Premium Is Worth Paying.
AWS ECS is not one pricing model. It is two completely different cost structures wearing the same product name. The launch type you choose (Fargate vs EC2) determines whether you pay per-second for exactly the compute your containers use, or whether you pay for EC2 instances and pack containers onto them yourself.
This distinction matters more than most teams realize. We have audited ECS deployments at LeanOps where switching from Fargate to EC2 launch type saved $4,000/month on a 20-service microservices cluster. We have also seen teams waste $2,000/month on over-provisioned EC2 instances that would have been cheaper on Fargate because their workloads were bursty with 3 hours of peak and 21 hours of near-idle.
The right choice depends on your workload pattern, team capacity, and whether you value operational simplicity or raw cost efficiency. This post gives you the exact numbers to make that decision.
Fargate Pricing: Every Fee in One Place
All prices are for Linux/x86 in us-east-1 as of May 2026. ARM (Graviton) pricing is 20% lower. Windows pricing is approximately 2x higher.
Compute Pricing (Per-Second, 1-Minute Minimum)
| Resource | Rate (us-east-1) | Rate (eu-west-1) | Rate (ap-northeast-1) |
|---|---|---|---|
| vCPU per hour | $0.04048 | $0.04556 | $0.04956 |
| Memory (GB) per hour | $0.004445 | $0.004997 | $0.005441 |
| Ephemeral storage (above 20GB) per GB-hour | $0.000111 | $0.000111 | $0.000111 |
Common Task Configurations: Monthly Cost (24/7)
| vCPU | Memory | Hourly Cost | Monthly (730hr) | With Savings Plan (50%) |
|---|---|---|---|---|
| 0.25 | 0.5 GB | $0.012 | $8.98 | $4.49 |
| 0.25 | 1 GB | $0.015 | $10.79 | $5.40 |
| 0.5 | 1 GB | $0.025 | $17.87 | $8.94 |
| 1 | 2 GB | $0.049 | $35.74 | $17.87 |
| 2 | 4 GB | $0.099 | $71.87 | $35.94 |
| 4 | 8 GB | $0.197 | $143.75 | $71.88 |
| 4 | 16 GB | $0.233 | $170.05 | $85.03 |
| 8 | 16 GB | $0.395 | $288.31 | $144.16 |
| 16 | 32 GB | $0.789 | $576.21 | $288.11 |
Fargate Spot Pricing
Fargate Spot tasks run on spare Fargate capacity at up to 70% discount but can be interrupted with a 2-minute warning.
| Resource | Spot Rate | Discount vs On-Demand |
|---|---|---|
| vCPU per hour | $0.012-0.024 (variable) | 40-70% |
| Memory (GB) per hour | $0.001-0.003 (variable) | 40-70% |
Fargate Spot is ideal for batch processing, data pipelines, and any workload that handles interruption gracefully. Not suitable for user-facing services or tasks that cannot checkpoint their work.
ARM/Graviton Pricing
| Resource | ARM Rate | Savings vs x86 |
|---|---|---|
| vCPU per hour | $0.03238 | 20% cheaper |
| Memory (GB) per hour | $0.003556 | 20% cheaper |
If your container images support ARM (most Go, Java, Node.js, and Python workloads do), switching to Graviton saves 20% with no other changes. This is the single easiest ECS cost optimization.
EC2 Launch Type Pricing: What You Actually Pay
With the EC2 launch type, ECS itself is free. You pay for the EC2 instances you provision and manage. ECS acts as an orchestrator placing tasks on your instances.
Equivalent Compute Cost Comparison
For context, here is what the same compute capacity costs on EC2 instances vs Fargate:
| Workload | Fargate Cost | EC2 On-Demand | EC2 + Savings Plan | EC2 + Spot | Savings vs Fargate |
|---|---|---|---|---|---|
| 1 vCPU / 2GB (24/7) | $35.74/mo | $24.82/mo (t3.small) | $15.33/mo | $7-12/mo | 30-80% |
| 4 vCPU / 8GB (24/7) | $143.75/mo | $96.36/mo (m6i.large) | $57.82/mo | $28-40/mo | 33-80% |
| 16 vCPU / 32GB (24/7) | $576.21/mo | $294.34/mo (m6i.xlarge x2) | $176.60/mo | $88-120/mo | 49-85% |
The EC2 advantage grows with scale because you can pack multiple tasks onto a single instance. A single m6i.large (2 vCPU, 8GB) at $57.82/month (Savings Plan) can run 4 tasks that would cost $143/month on Fargate.
The EC2 Overhead You Must Account For
| Item | Cost | Why |
|---|---|---|
| ECS Agent CPU/Memory overhead | ~256MB RAM per instance | ECS container agent consumes resources |
| Instance management tooling (SSM, monitoring) | $5-15/instance/month | CloudWatch agent, SSM agent |
| Over-provisioning buffer | 15-25% idle capacity | Need headroom for task placement and rolling deploys |
| Patching/maintenance downtime | Operational cost | AMI updates, kernel patches require drain/replace |
A realistic comparison accounts for these overheads. The raw instance price is not your true cost; you need to buffer 20-30% for agent overhead, placement headroom, and the operational cost of managing the fleet.
The Real Cost: Full ECS Deployment (Not Just Compute)
Container compute is typically only 40-60% of your total ECS bill. Here is everything else:
Networking Costs (The Biggest Hidden Fee)
| Component | Rate | Typical Monthly Cost (20-task cluster) |
|---|---|---|
| NAT Gateway (hourly) | $0.045/hour | $32.85/month (per AZ) |
| NAT Gateway (data processed) | $0.045/GB | $50-200/month |
| ALB (hourly) | $0.0225/hour | $16.43/month |
| ALB (LCU-hours) | $0.008/LCU-hour | $20-80/month |
| Inter-AZ data transfer | $0.01/GB each direction | $10-50/month |
| VPC Interface Endpoints | $0.01/hour + $0.01/GB | $7.30/endpoint/month |
NAT Gateway is the silent budget killer. Every Fargate task in a private subnet that needs to pull container images, call AWS APIs (CloudWatch, Secrets Manager, S3), or reach external services routes through NAT Gateway. At $0.045/GB, a cluster generating 500GB/month of outbound traffic pays $22.50 just for NAT data processing on top of the $32.85/month hourly charge per AZ.
The fix: Use VPC Interface Endpoints for AWS services ($7.30/month each for ECR, CloudWatch Logs, S3, Secrets Manager) to bypass NAT Gateway entirely for AWS API traffic. This typically saves $50-150/month on a medium cluster.
Observability Costs
| Component | Rate | Typical Monthly Cost |
|---|---|---|
| CloudWatch Logs ingestion | $0.50/GB | $25-100/month (20 tasks) |
| CloudWatch Logs storage | $0.03/GB/month | $5-20/month |
| Container Insights | $0.30/container/month | $6-30/month |
| X-Ray traces | $5/million traces | $5-50/month |
Container logs are deceptively expensive. A single task generating 1GB/day of logs costs $15/month in ingestion alone. Multiply by 20 tasks and you are at $300/month just for log storage. Filtering logs at the task level (only ship ERROR and above to CloudWatch, use cheaper destinations for DEBUG) cuts this by 60-80%.
Container Registry (ECR)
| Component | Rate | Notes |
|---|---|---|
| Storage | $0.10/GB/month | Per image layer stored |
| Data transfer (same region) | $0.00 | Free within region |
| Data transfer (cross-region) | $0.09/GB | Expensive for multi-region |
| Image scanning | $0.09/image/scan | Basic scanning; enhanced is more |
Most teams store 5-20GB of container images. At $0.10/GB, this is a minor cost ($0.50-2/month). But teams that do not implement lifecycle policies accumulate hundreds of unused image versions, running up $10-50/month unnecessarily.
Real-World Cost Modeling
Scenario 1: Small Microservices Cluster (5 Services, Dev/Staging)
5 services, each 0.5 vCPU / 1GB, running 12 hours/day (weekdays only).
| Component | Fargate | EC2 Launch Type |
|---|---|---|
| Compute | $46/mo | $29/mo (t3.medium shared) |
| ALB | $25/mo | $25/mo |
| NAT Gateway | $45/mo | $45/mo |
| CloudWatch Logs | $15/mo | $15/mo |
| ECR | $2/mo | $2/mo |
| Total | $133/mo | $116/mo |
At this scale, the difference between Fargate and EC2 is small ($17/month). Fargate wins on simplicity because managing a t3.medium for 5 intermittent services is not worth the operational overhead.
Scenario 2: Production Microservices (20 Services, 24/7)
20 services averaging 1 vCPU / 2GB each, running 24/7 with auto-scaling to 2x during peak hours (4 hours/day).
| Component | Fargate | Fargate + Savings Plan | EC2 + Savings Plan |
|---|---|---|---|
| Compute (baseline) | $715/mo | $358/mo | $230/mo |
| Compute (peak burst) | $120/mo | $60/mo | $0 (headroom) |
| ALB (2x) | $50/mo | $50/mo | $50/mo |
| NAT Gateway | $120/mo | $120/mo | $120/mo |
| CloudWatch Logs | $60/mo | $60/mo | $60/mo |
| VPC Endpoints | $30/mo | $30/mo | $30/mo |
| EC2 management overhead | $0 | $0 | $40/mo |
| Total | $1,095/mo | $678/mo | $530/mo |
At 20 services, the EC2 launch type with Savings Plans saves $548/month vs on-demand Fargate ($6,576/year). Fargate with Savings Plans is a reasonable middle ground at $678/month, saving $417/month vs on-demand while avoiding EC2 management.
Scenario 3: Large-Scale Production (100 Services, Multi-AZ)
100 services averaging 1 vCPU / 2GB, running across 3 AZs with auto-scaling.
| Component | Fargate + SP | EC2 + SP + Spot Mix |
|---|---|---|
| Compute | $1,790/mo | $800/mo |
| ALB (multiple) | $150/mo | $150/mo |
| NAT Gateway (3 AZ) | $300/mo | $300/mo |
| CloudWatch Logs | $200/mo | $200/mo |
| VPC Endpoints | $60/mo | $60/mo |
| EC2 management/tooling | $0 | $100/mo |
| Total | $2,500/mo | $1,610/mo |
At 100-service scale, the EC2 launch type saves approximately $890/month ($10,680/year). At this point, the operational overhead of managing EC2 instances is justified by the savings, and most teams have the infrastructure expertise to handle it.
Cost Optimization Strategies (Ordered by Impact)
1. Switch to ARM/Graviton (Saves 20%, Zero Effort)
If your containers run on Node.js, Python, Go, Java 11+, or .NET 6+, multi-architecture builds are trivial:
# Build multi-arch image
docker buildx build --platform linux/amd64,linux/arm64 -t myapp:latest --push .
Update your task definition to use ARM64 and save 20% on both Fargate and EC2 launch types.
2. Right-Size Task Definitions (Saves 20-40%)
Most ECS tasks are over-provisioned. Teams set 1 vCPU / 2GB "to be safe" when the container actually uses 0.3 vCPU / 512MB at peak.
Check actual usage in CloudWatch Container Insights or use ecs-exec to observe real resource consumption. Fargate bills per-second at exact resource allocation: dropping from 1 vCPU to 0.5 vCPU literally halves your vCPU cost.
3. Use Fargate Savings Plans for Steady-State (Saves 50%)
If you know you will run at least $X/hour of Fargate compute for the next year, a Savings Plan at that committed level saves 50%. The plan applies flexibly across all task sizes and regions.
Calculate your floor: if your minimum steady-state Fargate spend is $5/hour, commit to $5/hour and pay half.
4. Fargate Spot for Batch and Non-Critical Work (Saves 40-70%)
Any task that can tolerate interruption (batch processing, data pipelines, CI/CD builds, dev environments) should run on Fargate Spot. Set a capacity provider strategy:
- Production services: 100% Fargate (on-demand)
- Batch/processing: 100% Fargate Spot
- Dev/staging: 70% Fargate Spot, 30% Fargate (on-demand fallback)
5. Replace NAT Gateway With VPC Endpoints (Saves $50-200/month)
For every AWS service your tasks call (ECR, S3, CloudWatch Logs, Secrets Manager, SQS), create a VPC Interface Endpoint. At $7.30/month each, 4 endpoints cost $29.20/month but eliminate hundreds of dollars in NAT Gateway data processing fees.
6. Implement Log Filtering (Saves 30-60% on CloudWatch)
Ship only ERROR/WARN to CloudWatch. Route DEBUG/INFO to S3 via Firehose ($0.029/GB vs $0.50/GB) or skip them entirely in production.
Fargate vs EC2 vs EKS: When to Use What
| Factor | Fargate | EC2 Launch Type | EKS (Kubernetes) |
|---|---|---|---|
| Operational overhead | Lowest | Medium | Highest |
| Cost at steady-state | Highest | Lowest | Medium (+ $73/month control plane) |
| Scaling speed | Seconds | Minutes (new instances) | Seconds (with Karpenter) |
| GPU support | No | Yes | Yes |
| Spot/preemptible | Yes (Fargate Spot) | Yes (EC2 Spot) | Yes (Karpenter Spot) |
| Windows containers | Yes (2x cost) | Yes | Limited |
| Best for team size | Small (no infra eng) | Medium (1+ infra eng) | Large (platform team) |
| Best for workload | Variable/bursty | Steady-state | Complex microservices |
The Bottom Line
AWS ECS pricing is straightforward once you separate Fargate cost from EC2 launch type cost. Fargate at $0.04048/vCPU-hour is the "easy button" that costs 50-70% more than managing your own EC2 fleet. That premium buys you zero infrastructure management, per-second billing, and instant scaling.
For most teams under 20 services, Fargate with Savings Plans is the right choice. The operational simplicity outweighs the cost premium. Above 20 steady-state services, the EC2 launch type with Savings Plans and Spot instances becomes the better economic choice if your team can handle instance lifecycle management.
The biggest optimization opportunity is not choosing between Fargate and EC2. It is eliminating the surrounding costs: NAT Gateway, over-provisioned tasks, verbose logging, and missing Savings Plans. These "peripheral" costs often exceed compute costs for small clusters.
Need help optimizing your ECS deployment costs? Our cloud cost optimization team has audited dozens of ECS/Fargate clusters and typically identifies 40-60% savings through right-sizing, Savings Plans, Spot adoption, and network cost elimination. Get a free assessment to see where your container spend is leaking.
Further reading:



