Serverless · Updated June 2026

AWS Lambda vs Cloudflare Workers: Pricing 2026

No cold starts and global edge execution vs the most mature serverless ecosystem. We compare real monthly costs at three request volumes — and explain when each platform is architecturally the right choice.

☁️ Choose AWS Lambda if you…

  • Need non-JavaScript runtime (Python, Go, Java, .NET)
  • Need VPC integration for private database access
  • Use AWS services (S3, DynamoDB, SQS, EventBridge)
  • Have long-running functions (up to 15 minutes)
  • Need sub-10ms cold start globally
  • Want the lowest per-request cost for JS workloads

🔶 Choose Cloudflare Workers if you…

  • Build JavaScript/TypeScript APIs requiring global low latency
  • Want no cold starts (V8 isolate model)
  • Need edge caching, KV, and D1 in one platform
  • Build high-traffic APIs where cost efficiency matters
  • Need Python, Go, or Java (only JS/Wasm native)
  • Need VPC integration with existing AWS databases

Pricing Breakdown

All prices June 2026. Lambda on-demand (128MB, 100ms avg duration). Workers Paid plan.

MetricAWS LambdaCloudflare Workers
Free tier1M requests/mo · 400K GB-sec/mo100K requests/day (3M/mo)
Request cost$0.20 / million requests$0.30 / million (above 10M incl.)
Compute cost$0.0000166667 / GB-second$0 (included in flat rate)
Paid plan base$0 (pay-per-use)$5/mo (incl. 10M req/mo)
Cold starts50–500ms (reducible with provisioned)~0ms (V8 isolates)
Max execution time15 minutes30 seconds (CPU time)
Cost at 10M req/mo (100ms, 128MB)$2 req + $21 compute = ~$23/mo$5/mo (base includes 10M)CHEAPER
Cost at 100M req/mo$20 req + $210 compute = ~$230/mo$5 + $27 overage = ~$32/mo
Cost at 1B req/mo$200 req + ~$2,100 compute = ~$2,300/mo$5 + $297 = ~$302/mo
LanguagesNode, Python, Go, Java, .NET, RubyJS/TS native, Wasm

Cost at 3 Request Volumes

Lambda: 128MB memory, 100ms avg duration. Workers: standard JS API handler.

🌱 Startup API

10M requests/month
AWS Lambda~$23/mo
Cloudflare Workers Paid$5/mo
WinnerWorkers by 4.6×

📈 Growth API

100M requests/month
AWS Lambda~$230/mo
Cloudflare Workers~$32/mo
WinnerWorkers by 7×

🏢 High-Traffic API

1B requests/month
AWS Lambda~$2,300/mo
Cloudflare Workers~$302/mo
WinnerWorkers by 7.6×
⚠ Lambda compute costs compound quickly

Lambda charges separately for requests AND compute time (GB-seconds). A function averaging 200ms duration at 256MB memory generates 2× the compute cost of one at 100ms/128MB. Workers has no compute cost dimension — you pay per request regardless of execution time (within the 30-second limit). For predictable API workloads, Workers' flat model is much easier to budget.

Architecture Trade-Offs That Matter

Cold Starts: Cloudflare's Structural Advantage

Lambda's container-based execution model means the first invocation of a function (or a function invoked after a period of inactivity) requires spinning up a container, initializing the runtime, and loading your code. This cold start adds 100–500ms to latency for Node.js functions and 1–5 seconds for Java or .NET functions with large dependency trees. Provisioned Concurrency eliminates cold starts by keeping containers pre-warmed — but at additional cost: $0.0000041 per GB-second of provisioned concurrency. Keeping 10 concurrent Lambda instances warm at 128MB costs an extra $32/month.

Cloudflare Workers uses V8 JavaScript isolates — the same technology that runs JavaScript in Chrome. Isolates start in under 5 milliseconds globally because there is no container or VM to spin up; the isolate is a lightweight in-process execution context. Every Worker invocation, globally, begins with sub-5ms initialization. For applications where consistent low latency is a user-facing requirement — APIs powering mobile apps, checkout flows, authentication endpoints — the zero-cold-start architecture delivers measurably better p99 latency without any configuration or additional cost.

Lambda's Runtime Breadth vs Workers' JavaScript Focus

Lambda's most important advantage is runtime support. If your team writes Python data processing functions, Go microservices, or Java Spring applications, Lambda supports them natively with optimized runtimes maintained by AWS. Your existing code, your existing dependencies, your existing Docker expertise all translate directly to Lambda. Workers is primarily a JavaScript and TypeScript platform. Rust, C, and Go can compile to WebAssembly and run in Workers, but the development experience is significantly more complex than writing native Lambda functions in those languages.

For teams with polyglot backends — some services in Python, some in Go, some in Node.js — Lambda's multi-runtime support means a single platform serves all serverless workloads without language-specific workarounds. Workers is the clear choice only when JavaScript or TypeScript is your primary language and global edge execution with no cold starts is a requirement.

AWS Ecosystem Integration vs Cloudflare's Integrated Stack

Lambda's integration with the AWS service ecosystem is unmatched. EventBridge triggers Lambda from any AWS event source. SQS invokes Lambda for queue-based processing. S3 events trigger Lambda for object processing pipelines. API Gateway, Application Load Balancer, and Function URLs provide HTTP interfaces. VPC integration allows Lambda to connect to private RDS, ElastiCache, and MSK clusters. If your application is built on AWS services, Lambda is the natural serverless compute choice — the integrations are pre-built, battle-tested, and require minimal configuration.

Cloudflare Workers integrates tightly with Cloudflare's own platform: KV (globally distributed key-value storage), D1 (serverless SQLite at the edge), R2 (S3-compatible object storage with no egress fees), Durable Objects (stateful coordination primitives), and the Cloudflare CDN itself. For applications built entirely on Cloudflare's stack — particularly read-heavy APIs, content delivery, and edge authentication — the integration density rivals AWS within Cloudflare's own ecosystem.

Calculate Your Serverless Cost

Enter your request volume and average function duration to compare Lambda, Workers, and Vercel Functions.

Open Serverless Calculator →

Frequently Asked Questions

Is Cloudflare Workers cheaper than AWS Lambda?+

For most request volumes, yes. Cloudflare Workers Paid plan charges $5/month base + $0.30 per million requests above 10M included. AWS Lambda charges $0.20 per million requests + compute time (GB-seconds). At 100M requests/month: Cloudflare Workers costs ~$32/month (base + 90M extra); AWS Lambda costs ~$20 in request fees plus $16–80 in compute time depending on function duration. For short-lived API handlers (<100ms), Lambda and Workers are comparable. For compute-heavy functions, Lambda can be significantly more expensive.

Does Cloudflare Workers have cold starts?+

Cloudflare Workers has no cold starts in the traditional sense. Workers run on the V8 isolate model — instead of spinning up a container per invocation (Lambda's approach), Workers execute in pre-warmed JavaScript isolates that start in under 5ms globally. This is Cloudflare's primary architectural advantage over Lambda: median first-byte response times of 15–30ms globally vs Lambda's 100–500ms for cold starts (which can be reduced with provisioned concurrency, at additional cost).

What languages can I use with Cloudflare Workers vs AWS Lambda?+

AWS Lambda supports any language via custom runtimes: Node.js, Python, Go, Java, .NET, Ruby, and more. This language breadth is Lambda's major advantage for teams with existing code in non-JavaScript languages. Cloudflare Workers supports JavaScript and TypeScript natively, and WebAssembly for other languages compiled to Wasm. Python, Rust, Go, and C can run as Wasm modules. The Workers developer experience is optimized for JavaScript; other language support is functional but less ergonomic than Lambda's native runtimes.

Can Cloudflare Workers access a database?+

Yes. Cloudflare Workers can connect to: Cloudflare D1 (serverless SQLite at the edge), Cloudflare KV (globally distributed key-value store), Cloudflare R2 (object storage), external databases via fetch() over TCP, and Hyperdrive (connection pooling proxy for Postgres). Connecting to a traditional Postgres or MySQL database from a Worker requires Hyperdrive or an HTTP-based database API (like Supabase, PlanetScale, or Neon). Lambda has more mature database connection patterns via VPC integration with RDS Proxy for connection pooling.

Related Comparisons