FunctionPriceBook

AWS Lambda vs Cloudflare Workers: the true cost

By Editorial team · 2026-05-12

In short: Lambda bills per request + GB-second (wall-clock time × memory) and charges ~$0.09/GB egress. Cloudflare Workers bills per request + CPU-millisecond (only while your code runs, not while it waits on I/O) and charges zero egress. For I/O-bound or egress-heavy APIs, Workers is usually cheaper despite its $0.30/1M request fee and $5/mo Paid minimum; for pure compute inside the free tier, Lambda's perpetual 400k GB-s is hard to beat.

AWS Lambda and Cloudflare Workers are the two most-compared serverless platforms, and they price compute on opposite philosophies. Understanding that difference tells you which one will be cheaper for your workload. (See the full Lambda vs Workers comparison.)

Two different meters

AWS LambdaCloudflare Workers
Request fee$0.20 / 1M$0.30 / 1M
Compute meterGB-seconds (wall-clock × memory)CPU-milliseconds (execution only)
Egress~$0.09/GB after 100 GB free$0
Free tier1M req + 400k GB-s/mo, perpetual100k req/day (~3M/mo)
Platform minimumnone$5/mo (Paid plan)

Snapshot captured June 2026 — verify on each vendor’s pricing page.

Why the meter matters

A typical API endpoint spends most of its time waiting — for a database, a third-party API, a cache. On Lambda you pay for that wait (GB-seconds count wall-clock time). On Workers you don’t (CPU-ms only counts execution). For an endpoint that runs 200 ms wall-clock but only 15 ms of CPU, Workers can be an order of magnitude cheaper on compute.

Where Lambda wins

Where Workers wins

Bottom line

If your traffic is small, Lambda’s free tier is the cheapest place to start. As you scale, egress and I/O wait usually decide it — and on both counts Workers tends to win, as long as you’re past the $5/mo minimum. Model your real numbers in the calculator.

Frequently asked questions

Is Cloudflare Workers cheaper than AWS Lambda?

For most web APIs, yes — because Workers bills CPU time (not wall-clock) and charges no egress, while Lambda bills GB-seconds of wall-clock time and ~$0.09/GB egress. The catch is the $5/mo Workers Paid minimum; below that the Lambda free tier (1M req + 400k GB-s, perpetual) can be cheaper for pure compute.

What is the difference between GB-seconds and CPU-milliseconds?

GB-seconds (Lambda) = memory × the full wall-clock duration, so you pay even while the function waits on a database or API. CPU-milliseconds (Workers) only count time the CPU is actually executing, so I/O wait is free. That makes Workers dramatically cheaper for I/O-bound code and Lambda simpler to reason about for CPU-bound code.

Related articles

Last updated: 2026-05-12