Softwr

Cloud · head to head

AWS Fargate vs AWS Lambda

AWS Fargate logo

AWS Fargate

Cloud

Serverless compute for containers on ECS and EKS, billed per vCPU and GB second

From
$0.04048/vCPU-hour
Free plan
No
AWS Lambda logo

AWS Lambda

Cloud

Run code without thinking about servers

From
Free
Free plan
Yes

The short version

  • AWS Lambda is a serverless compute service.
  • AWS Lambda is free; AWS Fargate starts at $0.04048/mo.
  • Only AWS Fargate lists no servers to manage; only AWS Lambda lists event-driven execution.
  • Where AWS Fargate falls short: steady, high-utilisation workloads cost more per vCPU than the same capacity on EC2, especially with reservations or Savings Plans.
  • Where AWS Lambda falls short: provisioned concurrency, used to avoid cold starts, is charged separately at $0.0000041667 per GB-second whether or not the function runs.

How do AWS Fargate and AWS Lambda differ?

AWS Fargate and AWS Lambda differ on starting price ($0.04048/vCPU-hour against Free), pricing model and free tier (No against Yes). Only the attributes on which AWS Fargate and AWS Lambda actually diverge.

Attributes where AWS Fargate and AWS Lambda differ
AttributeAWS FargateAWS Lambda
Starting price$0.04048/vCPU-hourFree
Pricing modelPer vCPU and GB secondUsage-based
Free tierNoYes
PlatformsWeb, Linux, WindowsWeb, API

Not yet recorded: category for AWS Fargate, founded for AWS Fargate.

Which features does each one have?

They share no listed features; 6 appear only for AWS Fargate and 20 only for AWS Lambda. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in AWS Fargate

  • No servers to manage
  • Per-second billing
  • Arm support
  • Fargate Spot
  • Task-level isolation
  • Windows containers

Only in AWS Lambda

  • Function-as-a-Service
  • Event-driven execution
  • Auto-scaling
  • Pay-per-use
  • Multiple languages
  • Concurrency limits
  • Dead Letter Queues
  • Environment variables

What is each one used for?

AWS Fargate is most often brought in for running web services and APIs on ECS without managing EC2 nodes; AWS Lambda for event-driven functions without managing servers. The jobs each tool is most often brought in to do.

AWS Fargate

  • Running web services and APIs on ECS without managing EC2 nodesnot AWS Lambda
  • Scheduled batch tasks that run for minutes and then stopnot AWS Lambda
  • Small teams that cannot staff cluster operationsnot AWS Lambda
  • Burst capacity for EKS pods through Fargate profilesnot AWS Lambda

AWS Lambda

  • Event-driven functions without managing serversnot AWS Fargate
  • API backends behind API Gatewaynot AWS Fargate
  • Processing S3, DynamoDB, SQS and Kinesis eventsnot AWS Fargate
  • Scheduled jobs without a always-on instancenot AWS Fargate
  • Edge compute through Lambda@Edgenot AWS Fargate

Where do AWS Fargate and AWS Lambda fall short?

AWS Fargate's most cited limit: there is no GPU support, which rules it out for machine learning inference that needs accelerators. AWS Lambda's: ephemeral storage beyond the included 512 MB is metered. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

AWS Fargate

  • Steady, high-utilisation workloads cost more per vCPU than the same capacity on EC2, especially with reservations or Savings Plans
  • There is no GPU support, which rules it out for machine learning inference that needs accelerators
  • Tasks cannot run privileged containers or use host-level access, which blocks some security and monitoring agents
  • Cold start for a new task takes longer than a warm EC2 node, which hurts bursty low-latency scaling
  • Rightsizing is coarse because vCPU and memory come in fixed combinations, so you can pay for memory you do not use

AWS Lambda

  • Billed on two axes at once, $0.20 per million requests plus $0.0000166667 per GB-second of duration, so memory settings change the bill as much as traffic does
  • Provisioned concurrency, used to avoid cold starts, is charged separately at $0.0000041667 per GB-second whether or not the function runs
  • Ephemeral storage beyond the included 512 MB is metered
  • Lambda@Edge costs $0.60 per million requests, three times the standard request rate
  • VPC use and cross-region data transfer carry EC2 charges on top

How much do AWS Fargate and AWS Lambda cost?

AWS Fargate starts at $0.04048/mo; AWS Lambda is free to use. Plan by plan below, from each vendor's own pricing page.

AWS Fargate

$0.04048/vCPU-hour
  • Linux x86$0.04048/vcpu-hour
    • $0.000011244 per vCPU per second
    • $0.000001235 per GB of memory per second
  • Linux Arm (Graviton)$0.03238/vcpu-hour
    • $0.0000089944 per vCPU per second
    • $0.0000009889 per GB of memory per second
  • Ephemeral storage$0.00011/gb-hour
    • $0.0000000308 per GB per second beyond the included 20 GB

AWS Lambda

Free
  • Free TierFree
    • 1M free requests/month
    • 400,000 GB-seconds/month
    • Always free

Which should you pick?

Choose AWS Fargate if

  • You need no servers to manage.
  • You work on Web, Linux, Windows.
  • You also want per-second billing.

Choose AWS Lambda if

  • You need function-as-a-service.
  • You want to start without paying.
  • You work on Web, API.
  • You also want event-driven execution.

Questions people ask

Is AWS Fargate or AWS Lambda better?
It depends on the job. AWS Fargate fits running web services and APIs on ECS without managing EC2 nodes; AWS Lambda fits event-driven functions without managing servers. AWS Fargate starts at $0.04048/vCPU-hour and AWS Lambda at Free.
Which is cheaper, AWS Fargate or AWS Lambda?
AWS Lambda has a free tier; the other does not. Paid plans start at $0.04048/vCPU-hour for AWS Fargate and Free for AWS Lambda.
Does AWS Fargate or AWS Lambda run on more platforms?
AWS Fargate runs on Web, Linux, Windows. AWS Lambda runs on Web, API.
Can I use AWS Lambda for free?
Yes. AWS Lambda has a free tier, so you can try it without paying. AWS Fargate starts at $0.04048/vCPU-hour.
What is AWS Fargate best used for?
AWS Fargate is most often used for running web services and apis on ecs without managing ec2 nodes, scheduled batch tasks that run for minutes and then stop, small teams that cannot staff cluster operations, burst capacity for eks pods through fargate profiles. Of those, running web services and apis on ecs without managing ec2 nodes and scheduled batch tasks that run for minutes and then stop are not what AWS Lambda is typically brought in for.
What can AWS Fargate do that AWS Lambda cannot?
AWS Fargate covers No servers to manage, Per-second billing, Arm support, Fargate Spot. AWS Lambda covers Function-as-a-Service, Event-driven execution, Auto-scaling, Pay-per-use.

Answered from the vendors’ own pages

AWS Fargate: How much does Fargate cost?

Linux x86 is $0.000011244 per vCPU second and $0.000001235 per GB second in us-east-1, about $0.0405 and $0.0044 per hour, per AWS.

AWS Lambda: Is there a free tier for AWS Lambda?

Yes. AWS Lambda offers a free tier including 1 million requests per month, 400,000 GB-seconds per month, and 100 GB monthly response streaming.

Source
AWS Fargate: Fargate or EC2?

Fargate removes node management and costs more per unit; EC2 is cheaper for steady, well-packed workloads.

AWS Lambda: How is AWS Lambda charged?

Lambda charges $0.20 per million requests. Duration charges are $0.0000166667 per GB-second for x86 (up to 6 billion GB-seconds/month in US East Ohio with tiered pricing). Ephemeral storage over the included 512 MB costs $0.0000000309 per GB-second. Provisioned Concurrency costs $0.0000041667 per GB-second with a 5-minute minimum.

Source
AWS Fargate: Does it work with Kubernetes?

Yes, EKS can run pods on Fargate through Fargate profiles.

AWS Lambda: What are Lambda Durable Functions pricing?

Lambda Durable Functions include operations at $8.00 per million (start execution, steps, waits). Data written costs $0.25 per GB. Data retention is $0.15 per GB-month with configurable 1-90 day retention (default 14 days).

Source
Share

Related pages

Other head to heads