Practical guide
Fargate pricing: calculate task CPU and memory hours
calculate ECS Fargate task CPU and memory cost. Includes a worked example, calculator scope, and practical questions.
Updated · Sources checked
Fargate bills requested resources over task runtime
A Fargate compute estimate combines vCPU time with memory time. The relevant quantities come from the task configuration and billable runtime, not just the application’s average CPU utilization. A lightly used task can therefore cost the same as a busy task with the same allocation and duration.
The calculator is scoped to Linux x86 Fargate CPU and memory in US East. Choose a supported CPU and memory pairing; an arbitrary combination is not necessarily a valid task configuration.
Worked example: four small services
Suppose four tasks each request 0.5 vCPU and 1 GB of memory and run for a 730-hour planning month. Together they consume 4 × 730 × 0.5 = 1,460 vCPU-hours and 4 × 730 × 1 = 2,920 GB-hours of memory.
The modeled subtotal is 1,460 × vCPU-hour rate + 2,920 × GB-hour rate. Enter four tasks and 730 hours per task, not 2,920 hours per task. The latter would count the task multiplier twice.
If the same four tasks run for only 220 hours each, the quantities become 440 vCPU-hours and 880 GB-hours. This isolates runtime while retaining the resource configuration. It does not mean an always-available application can safely adopt a workday schedule.
Include lifecycle overhead
Task startup and image download can affect billable duration. AWS documents per-second pricing with a Linux minimum, whereas this calculator uses monthly whole hours. Numerous short tasks need runtime accounting that includes minimum billing and lifecycle overhead rather than simply summing application handler durations.
Additional ephemeral storage, logging, load balancing, networking, public IPv4, and data transfer are outside the CPU-and-memory subtotal. ARM and Windows pricing, Spot, and commitment discounts also require their own applicable assumptions.
Measure task duration and resource pressure before reducing allocations. A smaller task that runs longer or fails more often may consume more total resources than the original configuration.
Frequently asked questions
Does low CPU utilization automatically lower the price? No. The requested allocation and billable runtime drive this model.
Is memory free because the task already pays for CPU? No. The estimate has separate CPU-time and memory-time components.
Calculate your scenario
Use the ecs fargate cost calculator. Keep the displayed region, pricing date, billing units, and exclusions alongside your result. The arithmetic examples above illustrate usage or explicitly hypothetical rates; they are not AWS quotes.
Source
Billing structure checked against official AWS documentation on September 6, 2026.