Serverless · Updated 2026-05-24

CF Workers vs Lambda

Cloudflare Workers wins when latency matters and your code fits the V8-isolate model: edge APIs, transformations, A/B routing, lightweight backends. AWS Lambda wins when you need a full Linux runtime, deep AWS integration, or the long-tail of languages and native modules. Most apps end up using both — Workers at the edge for cold-path-sensitive surfaces, Lambda for everything else.

PLATE — SERVERLESS SHAPESWORKERS · V8 ISOLATES, EDGE~300 PoPs · 100+ countriesV8 isolate~5 ms cold start · 128 MBvsLAMBDA · LINUX MICROVMsus-east-1microVMNode 20microVMPythonmicroVMJavaVPCRDSdeep AWS integration50-500 ms cold · 10 GB mem · 15 minany language · native modules · VPCEDGE ISOLATES · REGIONAL MICROVMs
Cloudflare Workers
V8 isolates at the edge. Sub-millisecond cold start, ~300 PoPs.
Since
2017
By
Cloudflare
License
Proprietary (open-source workerd runtime)
workers.cloudflare.com ↗
AWS Lambda
Full Linux runtimes on demand. Any language, any package, deep AWS integration.
Since
2014
By
AWS
License
Proprietary
aws.amazon.com/lambda ↗

These aren't the same shape of tool even though both are "serverless functions". A Worker is a V8 isolate that starts in under 5 ms and runs at the closest data centre to the user. A Lambda is a containerised function that takes 50-500 ms to cold-start and runs in a single AWS region. Workers trade flexibility for proximity and speed; Lambda trades latency for capability and ecosystem.

Quick takes

If you're…

  • You're fronting an existing origin with edge logic (A/B, auth, rewrites) CF Workers This is exactly what Workers were built for. Run code before the request hits your origin.
  • You need to run Python with NumPy or a native compiled module Lambda Workers run V8 isolates only; no Python, no native modules. Lambda runs anything.
  • Cold start is on your SLO CF Workers ~5 ms vs 50-500 ms. Massive win for user-facing paths.
  • You're deeply integrated with AWS (SQS, S3, RDS in VPC) Lambda Lambda's IAM + VPC integration is unmatched. Workers can call AWS but it's outside-in.
  • You need to run for more than 5 minutes Lambda Workers have a 30-second CPU time limit. Lambda goes up to 15 minutes.
  • You want to serve from 300+ data centres globally with no config CF Workers Workers run at every Cloudflare PoP automatically. Lambda is single-region (or use Lambda@Edge with limitations).
  • You're building API endpoints under 1 ms response time CF Workers Edge proximity + isolate startup math. Lambda's round-trip from US-East alone is often slower.
  • You need to call a relational DB inside a VPC Lambda Lambda + VPC + RDS works. Workers can connect via Hyperdrive or AWS public endpoints but it's more setup.
Decision wizard

A few questions, a verdict.

Q1

What's your primary workload?

Q2

Cold start sensitivity?

Q3

Runtime needs?

Q4

AWS integration?

At a glance

The scorecard.

Dimension
CF Workers
Lambda
Edge
V8 isolates, ~5ms cold
Linux microVM, 50-500ms cold
depends
JS, TS, WASM
Every major language + custom
Lambda
~5 ms (isolate model)
50-500 ms; provisioned concurrency
CF Workers
~300 PoPs auto-distributed
Single region; Lambda@Edge limited
CF Workers
Strong inside CF; HTTP outside
Deep AWS integration (IAM, VPC, events)
Lambda
$5/mo + $0.30/M after
$0.20/M + GB-second compute
depends
Wrangler + miniflare; one CLI
SAM, Serverless, CDK; many options
CF Workers
Limits core
30s CPU, 128 MB mem
15 min execution, 10 GB mem
Lambda
In depth

Dimension by dimension.

core

Runtime model

depends
CF Workers

V8 isolates. Each request gets a lightweight V8 context that shares the engine with other isolates. Sub-millisecond startup. Memory limited to ~128 MB.

Lambda

Full Linux runtime (Amazon Linux 2 / 2023). Each cold start spins up a microVM (Firecracker), boots the runtime, loads the function. 50-500 ms cold start typical. Up to 10 GB memory.

core

Language support

edge: Lambda
CF Workers

JavaScript, TypeScript, WASM (any language that compiles to WASM — Rust, Go via TinyGo, C++ via Emscripten). Python via Pyodide (beta). No native modules.

Lambda

Node.js, Python, Java, .NET, Go, Ruby, custom runtimes via container images. Native modules work. Anything you can run on Linux runs on Lambda.

core

Cold start

edge: CF Workers
CF Workers

~5 ms typical. The isolate-per-request model means there is functionally no cold start in the way other platforms have one.

Lambda

50 ms (Node) to 500+ ms (Java with cold JVM). Provisioned concurrency mitigates but costs money. SnapStart helps for Java specifically.

features

Geographic distribution

edge: CF Workers
CF Workers

Runs in every Cloudflare data centre — ~300 PoPs across 100+ countries. Code runs near every user automatically, no configuration.

Lambda

Single-region by default. Lambda@Edge runs at CloudFront edge but with limitations (no env vars, smaller code, 5s timeout). Multi-region active-active requires real architecture work.

features

Platform integration

edge: Lambda
CF Workers

Workers Bindings: KV, R2, D1, Queues, Durable Objects, Vectorize, Hyperdrive, AI Workers. All Cloudflare's own services, well-integrated. Outside the CF ecosystem, you're using HTTP.

Lambda

Deep AWS integration. IAM, VPC, SQS, SNS, EventBridge, S3, DynamoDB, RDS Proxy, Kinesis — all native. Triggers from any AWS event source.

ops

Pricing model

depends
CF Workers

$5/mo for 10M requests + $0.30/M after. Workers Paid plan removes the 100k/day free tier limit. CPU time is metered separately on Unbound plan.

Lambda

$0.20/M requests + $0.0000166667/GB-second compute. The free tier (1M requests + 400K GB-seconds/month) is generous. Costs compound on chatty workloads.

ops

Tooling

edge: CF Workers
CF Workers

Wrangler CLI is excellent. Dev mode runs Workers locally with miniflare. Deploy is a single command. GitHub integration via the dashboard.

Lambda

AWS SAM, Serverless Framework, AWS CDK, Architect. Many options, each opinionated. Local dev is harder (LocalStack helps).

core

Limits

edge: Lambda
CF Workers

30 s CPU time (Unbound), 50 sub-requests per request, 128 MB memory, 10 ms CPU per request on Free / Bundled.

Lambda

15 min execution time, 10 GB memory, 6 MB request payload, 512 MB-10 GB ephemeral storage. Functionally limitless for long-running batch.

Benchmark

Round-trip latency from US East user, simple JSON API

Test client in Virginia, US. Both functions return the same 1 KB JSON payload, no DB call. Worker deployed globally (auto-routed to nearest PoP); Lambda deployed in us-east-1 behind API Gateway. Numbers from public benchmarks plus a Semicolony retest (2026).

Metric
CF Workers
Lambda
Better
p50 cold start + execute
Worker isolates start in ~5ms; Lambda + API Gateway adds overhead.
12 ms
142 ms
CF Workers
p50 warm
8 ms
38 ms
CF Workers
p99 latency
Lambda's cold-start tail is real.
18 ms
290 ms
CF Workers
Cost per 10M requests (no compute)
Lambda wins on raw request cost; Workers includes more in $5/mo base.
33 USD
2 USD
Lambda
Cost per 10M requests, 50ms each
Lambda's GB-second pricing dominates beyond trivial workloads.
33 USD
85 USD
CF Workers

Source: Cloudflare Workers vs Lambda public benchmark ↗

When to pick neither

A different shape of problem.

  • Vercel Functions
    You're on Next.js and want the closest possible integration
  • Deno Deploy
    You want isolate-based serverless with the Deno runtime
  • Fly.io Machines
    You want long-running processes, persistent volumes, multi-region by default
  • Google Cloud Run
    Container-based serverless, GCP-native, no Lambda limits
  • AWS Fargate
    You want serverless containers, not functions — longer-running, ECS-native
  • Railway / Render
    You'd rather pay flat fee for a long-running container
Situational picks

For specific cases.

A/B testing and routing logic in front of your origin

CF Workers

Workers were designed for this exact pattern. Sub-10ms decisions at every edge PoP.

Batch processing job triggered by an S3 upload

Lambda

Lambda + S3 event source is the canonical pattern. 15-minute runtime, 10GB memory, native AWS integration.

Lightweight API serving JSON to mobile clients globally

CF Workers

Edge proximity matters for mobile. KV + D1 + Workers AI inside Cloudflare gives sub-50ms responses anywhere.

Python ML inference on a CPU model

Lambda

Workers Python is still beta and lacks compiled-extension support. Lambda + PyTorch CPU works today.

Scheduled job that runs every minute, processes data

Lambda

EventBridge + Lambda is the standard pattern. Workers Cron triggers exist but EventBridge has more flexibility.

Long-running stateful workload

Fly.io Machines or Cloud Run

Both Workers and Lambda are ephemeral. For long-running services, containers on Fly or Cloud Run fit better.

Sources

Primary material.

Found this useful?