Practical guide

Fargate rightsizing: compare task size and runtime together

compare Fargate task rightsizing savings. Includes a worked example, calculator scope, and practical questions.

Updated · Sources checked

Smaller allocation helps only after accounting for runtime

For a fixed batch of work, compare resource-hours per completed job. Cutting a task’s resources can extend runtime enough to offset the lower hourly cost. For a continuously running service, the question is instead whether the smaller allocation sustains the same throughput and reliability.

Use representative jobs or production-like load. A quiet test can miss memory peaks, startup behavior, or external-service latency that changes the outcome.

Worked example: a daily batch task

Assume configuration A requests 1 vCPU and 2 GB of memory and completes in two hours. One job uses two vCPU-hours and four GB-hours. For 30 jobs, monthly consumption is 60 vCPU-hours and 120 GB-hours.

Configuration B requests 0.5 vCPU and 1 GB. If the same job takes three hours, it uses 1.5 vCPU-hours and three GB-hours. Across 30 jobs, it consumes 45 vCPU-hours and 90 GB-hours: 25% less of both resources in this hypothetical benchmark.

If B instead takes five hours, its monthly quantities become 75 vCPU-hours and 150 GB-hours, which are 25% above A. Under unchanged rates, the allocation reduction breaks even at four hours per job because runtime has doubled while both resource quantities per hour have halved.

Translate the benchmark to calculator inputs

For identical repeated jobs, use a task count and total per-task hours that reproduce the measured resource-hours. Record how you aggregated jobs so the count is not multiplied twice. If runtimes are short, include the billing minimum and startup period in a more precise worksheet.

The calculator covers the supported Linux x86 CPU-and-memory components only. It does not value delayed completion, missed deadlines, retries, extra storage, or dependencies. Compare successful jobs rather than attempted jobs if one configuration has a higher failure rate.

Frequently asked questions

Should every Fargate task use the smallest configuration? No. Choose the smallest valid configuration that meets workload requirements after measurement.

Does this example prove a 25% saving? Only for its hypothetical durations. Repeat the arithmetic using observed runtimes and the current applicable CPU and memory rates.

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.

Official sources

Related calculators

Continue reading