Lambda vs Fargate Cost Comparison 2026

The cost of runnning serverless workloads on Lambda versus container-based workloads on Fargate depends on usage patterns, memory allocation, and data transfer. This guide outlines typical price ranges and the main cost drivers for U.S. buyers, with concrete figures to help budget decisions.

Item Low Average High Notes
Compute (Lambda) $1.50 $15.00 $150.00 Assumes 1M requests, 128 MB, 100 ms per request, plus free tier.
Compute (Fargate) $5.00 $60.00 $600.00 Assumes 2 vCPU + 4 GB, 24 hours running per month.
Data Transfer & Networking $0.50 $5.00 $50.00 Border between AWS and the internet or other regions.
Storage & Logs $0.20 $2.00 $20.00 Logs, artifacts, and temporary storage for functions.
Development Time (Labor) $0.00 $8.00 $40.00 Assumes developer hours spent on deployment automation.

Overview Of Costs

Cost differences between Lambda and Fargate hinge on usage patterns, with Lambda offering fine-grained, event-driven billing and Fargate providing predictable container capacity. Low, average, and high ranges reflect monthly workloads from lightweight, sporadic invocations to steady, high-throughput processes. Assumptions: region, workload shape, and data egress vary by scenario.

Cost Breakdown

Component Lambda Fargate Notes
Compute ($/request) 0.20¢ + duration in GB-seconds ($/vCPU-hour and $/GB-hour) Lambda charges by request count and compute time; Fargate charges by allocated resources and runtime.
Storage Logs and temporary storage billed separately Persistent container volume storage Logs can accumulate; consider retention policy.
Networking Data transfer out to the internet Inter-region and outbound data Intra-AWS transfers may be cheaper within same region.
Labor Minimal for simple functions Moderate for container orchestration and CI/CD Bootstrapping and automation affect total cost.
Overhead & Management Lightweight for event-driven workloads Indicates cluster management and scheduling Container orchestration adds operational costs.
Taxes & Fees Applicable variably by region Applies to service usage and data transfer depends on account and location.

Factors That Affect Price

Usage pattern is the dominant driver: Lambda shines with sporadic, short-lived tasks, while Fargate grows with sustained, predictable workloads. Resource configuration matters: Lambda memory allocations affect GB-seconds; Fargate vCPU and memory selections set the per-hour rate.

Ways To Save

Adopt cost-control strategies to manage both services. Right-size resources for Fargate by benchmarking peak and average loads. Use reserved capacity or Savings Plans if long-running containers are predictable. For Lambda, enable provisioned concurrency only for critical paths to control cold starts, and optimize function durations to reduce GB-seconds.

Regional Price Differences

Pricing for cloud services varies by U.S. region. In general, three patterns emerge: Coast-heavy regions tend to have higher data transfer costs, while central and southern regions commonly show slightly lower compute rates. A typical delta across major metros can be ±10–20% for data egress and ±5–15% for compute.

Labor & Installation Time

When evaluating total cost, include development and deployment time. Initial setup and ongoing maintenance for Fargate often require more ops effort than Lambda, especially with container deployments, CI/CD pipelines, and cluster tuning. Estimate ongoing labor at roughly 2–6 hours per month for moderate use cases, depending on automation maturity.

Real-World Pricing Examples

Three scenario cards illustrate typical outcomes. Assumptions: region, workload specs, and retention policies.

  1. Basic: Lightweight API with 100k requests/month, 128 MB memory, 200 ms average duration on Lambda; minimal logging. Compute costs dominate; total around $5–$15/month.
  2. Mid-Range: API with 1M requests/month, 256 MB memory, 500 ms duration; moderate logs; Fargate reserved 0.5 vCPU, 2 GB. Data transfer and storage add to the total; expect $60–$180/month.
  3. Premium: Event-driven microservices with 10M requests, 1 GB memory, 1 s duration; Fargate 2 vCPU, 4 GB, persistent storage; higher data egress. Total range $600–$1,200/month or more depending on retention and regional costs.

Assumptions: region, specs, labor hours.

Cost Compared To Alternatives

In some cases, alternate architectures such as hybrid serverless with light containers or managed services reduce total spend by consolidating workloads. Evaluate per-use costs against predictable monthly spend to decide between Lambda and Fargate. For bursty, event-driven tasks, Lambda often yields lower upfront costs; for steady, long-running services, Fargate can be more cost-efficient with proper sizing.

Price At A Glance

Lambda: billed per request and GB-second; best for intermittent workloads, small memory footprints, and rapid scaling. Fargate: billed per vCPU-hour and GB-hour; best for consistent container workloads with predictable traffic and complex dependencies. Both services offer free tiers and regional pricing variations.

data-formula=”labor_hours × hourly_rate”>