Fargate eliminates cluster management, but its per-vCPU and per-GB pricing means over-provisioned task definitions directly waste money. Most teams allocate 2-4x more CPU and memory than their containers actually use, paying premium serverless prices for idle resources.
TL;DR: Three biggest Fargate savings: (1) Right-size task definitions using Container Insights metrics — most tasks use under 30% of allocated resources. (2) Use Fargate Spot for fault-tolerant workloads — 70% discount with 2-minute interruption warnings. (3) Switch to ARM64 (Graviton) — 20% cheaper with comparable performance. Combined, these save 50-75%.
Fargate Pricing Reminder
| Resource | On-Demand (x86) | On-Demand (ARM64) | Spot (x86) |
|---|---|---|---|
| vCPU per hour | $0.04048 | $0.03238 | $0.01214 |
| GB memory per hour | $0.004445 | $0.003556 | $0.001334 |
Example: A task with 1 vCPU and 2 GB RAM costs:
- x86 on-demand: $0.04937/hour = $36.04/month
- ARM64 on-demand: $0.03949/hour = $28.83/month
- x86 Spot: $0.01481/hour = $10.81/month
Strategy 1: Right-Size Task Definitions
Fargate charges per vCPU and GB allocated, not used. A task allocated 4 vCPU / 8 GB running at 15% CPU utilization wastes 85% of compute spend.
How to right-size:
- Enable Container Insights in ECS
- Monitor
CpuUtilizedvsCpuReservedandMemoryUtilizedvsMemoryReservedfor 7+ days - Set CPU allocation to 2x peak utilization
- Set memory allocation to 1.5x peak usage (memory needs more headroom)
| Current Allocation | Actual Usage | Right-Sized | Monthly Savings |
|---|---|---|---|
| 4 vCPU / 8 GB | 0.5 vCPU / 2 GB | 1 vCPU / 4 GB | 65% ($93 to $32) |
| 2 vCPU / 4 GB | 0.3 vCPU / 1.5 GB | 0.5 vCPU / 2 GB | 65% ($47 to $16) |
Strategy 2: Use Fargate Spot
Fargate Spot provides up to 70% discount on compute with 2-minute interruption warnings. Ideal for:
- Batch processing and data pipelines
- Worker tasks that process queues
- CI/CD build tasks
- Development and staging environments
- Any workload with retry logic
Not recommended for: Customer-facing API servers, databases, or services without graceful shutdown handling.
ECS capacity provider strategy: Set a mix of 70% Spot / 30% on-demand for production worker pools to balance cost and availability.
Strategy 3: Switch to ARM64 (Graviton)
ARM64 Fargate tasks are 20% cheaper per vCPU-hour and 20% cheaper per GB-hour. Most containerized applications run on ARM64 without code changes — just rebuild the Docker image for linux/arm64.
| Architecture | 1 vCPU / 2 GB Monthly | Savings |
|---|---|---|
| x86 | $36.04 | — |
| ARM64 | $28.83 | 20% |
Strategy 4: Scale Based on Metrics
Use ECS Service Auto Scaling to match capacity to demand:
- Target tracking: maintain 70% average CPU utilization
- Step scaling: add tasks when queue depth exceeds thresholds
- Scheduled scaling: reduce desired count during off-hours
A service running 10 tasks 24/7 that only needs 10 tasks during business hours costs 67% less with scheduled scaling (10 tasks for 8 hours, 2 tasks for 16 hours).
Strategy 5: Optimize Container Images
Smaller images mean faster startup and less bandwidth:
- Use Alpine or distroless base images (5-50 MB vs 200+ MB for Ubuntu)
- Multi-stage builds to exclude build tools from runtime image
- Remove unnecessary dependencies
Faster startup enables more aggressive auto-scaling — you can scale down more aggressively when tasks spin up quickly.
Strategy 6: Use Compute Savings Plans
Compute Savings Plans apply to Fargate (and EC2, Lambda). 1-year plans save approximately 20%, 3-year plans save approximately 40%.
| Commitment | Discount |
|---|---|
| 1-year no upfront | ~17% |
| 1-year all upfront | ~20% |
| 3-year all upfront | ~40% |
Savings Plans apply after Spot discounts, so Spot + Savings Plans can stack for maximum savings.
Related Guides
- AWS Fargate Pricing Guide
- ECS vs EKS vs Fargate Comparison
- Kubernetes Cost Optimization Guide
- AWS EC2 Cost Optimization Guide
FAQ
Is Fargate or EC2 launch type cheaper for ECS?
EC2 launch type with Spot instances is typically 30-50% cheaper than Fargate for workloads that maintain high utilization. Fargate is cheaper when tasks run intermittently or when the operational overhead of managing EC2 instances would require additional engineering time.
Can I combine Fargate Spot with Savings Plans?
Yes. Savings Plans apply to the Fargate Spot price, providing additional savings on top of the 70% Spot discount. This makes Fargate Spot with Savings Plans the cheapest Fargate option.
How do I handle Fargate Spot interruptions?
Fargate sends a SIGTERM signal 2 minutes before stopping the task. Implement graceful shutdown: stop accepting new work, finish in-progress items, checkpoint state, and exit cleanly. ECS automatically replaces the task if your service definition maintains a desired count.
Lower Your Fargate Costs with Wring
Wring helps you access AWS credits and volume discounts to lower your Fargate costs. Through group buying power, Wring negotiates better rates so you pay less per vCPU-hour.
