Cloudflare Workers vs AWS Lambda: Which Should You Pick?

CPU-time billing vs GB-seconds, 348 edge cities vs 39 AWS regions, and V8 isolates vs containers: how the two serverless platforms actually compare in 2026.

Cloudflare Workers pricing announcement graphic illustrating scale-to-zero serverless billing
Cloudflare's Workers pricing announcement graphic. Image: Cloudflare.

Cloudflare Workers bills for the CPU time your code actually spends computing, with a free tier covering 100,000 requests a day and no charge at all for time spent waiting on a network call. AWS Lambda bills for wall-clock duration multiplied by the memory you allocate, with a permanent free tier of 1 million requests and 400,000 GB-seconds a month. That one difference in billing model — CPU time vs. GB-seconds — decides which platform is cheaper for a given workload far more reliably than either vendor's headline rate. Beyond price, Workers run as V8 isolates spread across Cloudflare's network of edge cities, while Lambda runs in reused, containerized execution environments inside a smaller set of AWS regions, with a far wider ceiling on memory, timeout, and supported languages.

Quick take: Choose Cloudflare Workers for latency-sensitive, I/O-bound HTTP logic — API edges, auth checks, redirects, A/B routing, personalization — where fast startup and global reach matter more than raw compute headroom. Choose AWS Lambda for CPU-heavy or long-running jobs, workloads that need more than 128 MB of memory, deep integration with other AWS services, or support for Java, .NET, Go, Ruby, or custom container images.

How Cloudflare Workers and AWS Lambda actually work

The two platforms solve "run my code on demand" with different machinery, and that choice ripples through everything else in this comparison. Cloudflare runs Workers code inside V8 isolates — the same lightweight sandboxing technology Chrome uses to separate browser tabs. According to Cloudflare's own engineering documentation, "any given isolate can start around a hundred times faster than a Node process on a container or virtual machine," and isolates "consume an order of magnitude less memory" on startup than a VM-based equivalent. Because many isolates share one already-running V8 process, Cloudflare says this model "eliminates the cold starts of the virtual machine model" that containerized platforms deal with.

AWS Lambda takes the container route. Each function runs inside an isolated execution environment that Lambda creates on demand, downloads your code into, and then reuses for subsequent invocations as long as traffic keeps the environment warm. When no warm environment is available — because traffic is scaling up, AWS is rebalancing load across Availability Zones, or you've just deployed new code or configuration — Lambda has to build a fresh environment and run your initialization code before your handler can execute. That's a cold start, and AWS's own performance guidance says this happens in under 1% of production invocations, usually adding somewhere between under 100 ms and just over a second.

Pricing: CPU time vs. GB-seconds

Cloudflare's Workers Standard plan costs a $5 per month minimum and includes 10 million requests and 30 million CPU milliseconds per month. Go over either number and Cloudflare charges $0.30 per additional million requests and $0.02 per additional million CPU milliseconds. Critically, Cloudflare does not charge for duration at all — a Worker that spends 200 ms waiting on a fetch to an origin server but only 3 ms actually computing is billed for 3 ms of CPU time, not 200 ms of wall clock. There's also no separate charge for data transfer or bandwidth on Workers.

AWS Lambda charges $0.20 per million requests (after the free tier) plus $0.0000166667 per GB-second of duration on x86 processors, metered at 1 ms granularity. A GB-second is wall-clock duration multiplied by the memory you've configured for the function — so a function that runs for 200 ms at 512 MB of memory is billed for roughly 0.1 GB-seconds regardless of whether it spent that time computing or idling on a database query. AWS also sells Graviton2 (arm64) as a cheaper option; its own launch post is titled "AWS Lambda Functions powered by AWS Graviton2 processor — Run Your Functions on Arm and Get Up to 34% Better Price Performance," though AWS does not publish an exact arm64 GB-second rate on its public pricing page in the way it does for x86. Lambda also offers Provisioned Concurrency, which keeps environments pre-initialized for consistent low latency at an added cost of $0.0000041667 per GB-second while provisioned, plus $0.0000097222 per GB-second of compute — and the free tier does not apply to functions using it.

DimensionCloudflare WorkersAWS Lambda
Billing unitActive CPU time onlyWall-clock duration × memory (GB-seconds)
Free tier100,000 requests/day, 10 ms CPU/invocation1M requests + 400,000 GB-seconds/month
Paid plan base cost$5/month minimum (Standard)$0 base; pay-as-you-go
Included usage (paid)10M requests + 30M CPU ms/monthNo bundled allowance beyond free tier
Overage rate$0.30/M requests, $0.02/M CPU ms$0.20/M requests, $0.0000166667/GB-s (x86)
Memory128 MB fixed per isolate128 MB–10,240 MB, configurable
Max CPU/duration per callUp to 5 min CPU time (paid); no wall-clock capUp to 1,800 sec (30 min) standard
Core languagesJavaScript, TypeScript, Python Workers, RustNode.js, Python, Java, .NET, Ruby, Go/Rust via OS-only runtime
Network footprint348 cities / 8 regions (edge)39 geographic regions

Free tier face-off

On paper, Lambda's free tier looks far more generous: 1 million requests and 400,000 GB-seconds every month, indefinitely, with no end date. At the smallest common memory setting (128 MB, or 0.125 GB), 400,000 GB-seconds works out to roughly 3.2 million seconds of total run time — plenty of room for a hobby project or a light backend, as long as you don't need Provisioned Concurrency, which forfeits the free tier entirely.

Workers' free plan looks smaller at first glance — 100,000 requests per day, which is about 3 million a month — but the more binding constraint is the 10 ms of CPU time per invocation it allows. That's enough for simple routing, header rewrites, or a cache lookup, but it will throttle quickly if your function does any real computation, JSON parsing of large payloads, or cryptography. Heavier logic effectively requires the $5/month Standard plan, where the CPU-time cap per invocation rises to 30 seconds by default (configurable up to 5 minutes).

Cold starts and startup latency

Startup latency is where the two platforms' architectures show up most directly in user-facing performance. Cloudflare's documentation frames the isolate model as something that sidesteps cold starts almost by design, since a new isolate starts inside an already-running process rather than spinning up a new container or VM. AWS, for its part, publishes its own cold-start telemetry rather than denying the problem exists: cold starts affect under 1% of invocations in production workloads it has analyzed, typically adding under 100 ms to just over a second, and they cluster around deploys, scale-up events, and Availability Zone rebalancing. Lambda's answer for latency-critical paths is Provisioned Concurrency, which AWS says delivers "double-digit millisecond" response times by keeping execution environments initialized ahead of traffic — at the added cost described above.

It's worth being skeptical of any single number quoted for "how much faster" one platform is than the other in absolute terms. Independent, third-party cold-start benchmarks exist and are easy to find, but their methodologies, regions, memory settings, and runtimes vary widely enough that results swing in both directions depending on who ran the test. Vendor documentation like Cloudflare's and AWS's own pages, cited above, describes each platform's architecture honestly but is still marketing in context — treat the general direction (isolates start faster than containers; Lambda cold starts are rare but not zero) as reliable, and treat any specific millisecond comparison between the two from a third party as that publisher's own test result, not an industry-verified figure.

Global network reach: edge PoPs vs. regions

Cloudflare operates in 348 cities across 8 regions, according to Cloudflare's network page, which also says 95% of the world's internet-connected population is within 50 milliseconds of one of those data centers (most are within 20 ms). A Worker you deploy runs automatically at whichever of those locations is nearest the incoming request — there's no region to pick.

AWS Lambda works differently: your function lives in whatever AWS Region you deploy it to, out of the 39 geographic regions AWS currently operates. Requests to that function travel to that region, not to whichever AWS location happens to be closest to the end user. AWS's closer answer to true edge compute is Lambda@Edge, which, per AWS's own CloudFront documentation, only supports Node.js and Python, is authored in the US East (N. Virginia) Region, and is then replicated out to CloudFront's edge locations when triggered — a narrower and more specialized setup than deploying a standard Lambda function.

Language and runtime support

Cloudflare lists JavaScript, TypeScript, Python Workers, and Rust as having "first-class support" on Workers. WebAssembly extends that further: compiled languages such as C, C++, Kotlin, and Go can run on Workers by compiling to Wasm, though that's a different development experience than writing native JS/TS.

Lambda's managed runtime list is considerably longer. As of late 2026, AWS maintains managed runtimes for Node.js (22, 24, 26), Python (3.11 through 3.15), Java (8, 11, 17, 21, 25), .NET 10, and Ruby (3.3, 3.4, 4.0) — all of them supporting both x86_64 and arm64. For compiled languages without a managed runtime, including Go, Rust, Swift, and C++, Lambda offers an OS-only runtime (provided.al2023) that you pair with a language-specific runtime interface client. Lambda also supports container images as a deployment unit, up to 10 GB uncompressed, which opens the door to effectively any language or custom base image.

Limits that actually matter: memory, timeout, concurrency

Cloudflare's published limits fix memory at 128 MB per isolate — covering the JavaScript heap and any WebAssembly allocations — and that number doesn't change on the paid plan. CPU time per invocation defaults to 30 seconds but can be raised up to 5 minutes in configuration (Cron Triggers on hourly-or-longer schedules can use up to 15 minutes of CPU time). There's no wall-clock duration cap at all: a Worker that's mostly waiting on upstream fetches can legally run far longer than its CPU-time budget would suggest, because idle wait time isn't billed or capped the way CPU time is. Script size is capped at 64 MiB uncompressed, and subrequests are capped at 50 per invocation on the free plan or up to 10,000 (configurable higher) on paid.

Lambda's limits are built around configurability rather than fixed ceilings. Memory runs from 128 MB to 10,240 MB in 1 MB increments (1,769 MB is roughly the equivalent of one vCPU), and function timeout tops out at 1,800 seconds (30 minutes) for standard invocations, or up to 5,400 seconds (90 minutes) for asynchronous and event-source-mapping invocations on AWS Lambda Managed Instances. Default concurrency per account is 1,000 simultaneous executions per region, adjustable into the tens of thousands on request. Deployment packages are capped at 50 MB zipped (or 250 MB unzipped, including layers) when uploaded directly, though container-image-based functions can go up to 10 GB.

Which one should you pick in 2026?

For latency-sensitive, request-shaped logic sitting in front of a larger system — routing, authentication checks, header rewriting, geo-based redirects, bot mitigation, A/B testing, lightweight personalization, or proxying to an origin — Cloudflare Workers' combination of CPU-only billing, fixed low memory needs, and automatic global placement is usually the cheaper and faster option, as long as the 128 MB memory ceiling and JS/TS/Python/Rust language set aren't a blocker.

For CPU- or memory-heavy workloads — video or image processing, larger ML inference, batch ETL jobs, anything that needs more than a few hundred milliseconds of genuine compute or more than 128 MB of RAM — or for teams already standing on AWS infrastructure and wanting native triggers from S3, SQS, DynamoDB Streams, or EventBridge, AWS Lambda's wider memory range, longer timeouts, and broader managed-language list make it the more natural fit. Teams with Java, .NET, Go, or Ruby codebases, or anyone who needs a full container image rather than a thin script, will also find Lambda's model more accommodating.

In practice, a growing number of production stacks use both: Workers sitting at the edge for routing, caching, and auth, with Lambda (or another compute layer) doing the heavier lifting behind it. That split mirrors a broader pattern in platform selection — our Railway vs Render vs Fly.io comparison covers a similar lightweight-edge-versus-full-platform tradeoff for teams that don't want serverless at all. If you're deploying either platform through code rather than click-ops, our Terraform vs Pulumi breakdown walks through managing Workers or Lambda resources declaratively. And since serverless compute rarely runs alone, our Supabase vs Firebase comparison is a useful next read for the database side of either stack.

What's next

Both platforms are still actively widening their limits rather than standing still. AWS has spent 2026 pushing Lambda toward longer-running and more EC2-like workloads — Lambda Managed Instances and Lambda MicroVMs both blur the serverless/virtual-machine line AWS drew for years — while Cloudflare has kept extending first-class language support on Workers beyond JavaScript and TypeScript into Python and Rust. Anyone choosing between the two in 2026 should treat today's limits as a snapshot rather than a hard ceiling, and check each vendor's own pricing and limits pages directly before committing a production workload to either number.

Frequently asked questions

What's the main pricing difference between Cloudflare Workers and AWS Lambda?

Cloudflare Workers bills for active CPU time only, so time spent waiting on a network call is free. AWS Lambda bills for GB-seconds: wall-clock duration multiplied by the memory you've configured, so idle wait time is billed the same as compute time.

Which has the better free tier, Cloudflare Workers or AWS Lambda?

AWS Lambda's free tier (1 million requests and 400,000 GB-seconds a month) is larger in raw numbers and never expires. Cloudflare Workers' free plan allows 100,000 requests a day but caps CPU time at just 10 ms per invocation, which limits it to lightweight logic unless you upgrade to the $5/month Standard plan.

Does Cloudflare Workers really avoid cold starts?

Cloudflare's documentation says its V8 isolate model starts roughly 100 times faster than a containerized Node process and avoids the cold starts associated with spinning up a new virtual machine. AWS Lambda does have cold starts, but its own data shows they affect under 1% of production invocations and typically add well under a second.

Can I run Python or other non-JavaScript languages on Cloudflare Workers?

Yes. Cloudflare gives JavaScript, TypeScript, Python Workers, and Rust first-class support. Other compiled languages, including C, C++, Kotlin, and Go, can run on Workers via WebAssembly.

What's the memory limit on each platform?

Cloudflare Workers fix memory at 128 MB per isolate on every plan. AWS Lambda lets you configure memory anywhere from 128 MB to 10,240 MB in 1 MB increments, which also scales the CPU power allocated to the function.

Can AWS Lambda run at the edge the way Cloudflare Workers does?

AWS's edge product is Lambda@Edge, which, per AWS's own CloudFront documentation, only supports Node.js and Python. Functions are authored in the US East (N. Virginia) Region and then replicated out to CloudFront's edge locations when triggered, which is a narrower setup than a standard Lambda deployment or a Cloudflare Worker.

Sources

More on Cloudflare Workers vs AWS Lambda →Cloudflare WorkersAWS LambdaServerlessEdge ComputingCloud Pricing
Felix Moreau
Written byFelix Moreau

Felix Moreau writes Pandromeda's software coverage and how-to guides. He covers Windows, macOS and Linux updates, the apps people rely on, emulators and developer tools, and turns official documentation into clear, numbered steps that work on the current version.

More from Software & Guides

See all