Published March 27, 2026 · 14 min read

Cloudflare Workers vs AWS Lambda in 2026: The Real Cost Comparison Nobody Talks About

We run over 250 production websites on Cloudflare Workers. Our monthly bill is $5. Not $500. Not $50. Five dollars. That single data point shaped everything about how we build software, and it should shape how you think about serverless too.

AWS Lambda is the default choice for serverless. It has been since 2014. But defaults are not always optimal. After migrating our entire infrastructure from a mix of services to Cloudflare Workers, we have hard numbers on what the difference actually looks like in production. This guide breaks down every meaningful difference between the two platforms so you can make the right call for your project.

Table of Contents

  1. Architecture Differences
  2. Pricing Breakdown
  3. Performance Benchmarks
  4. Developer Experience
  5. Limits and Constraints
  6. Storage and Databases
  7. When to Use Each
  8. Migration Tips
  9. Our Verdict

Architecture Differences That Actually Matter

The fundamental difference between these platforms is not marketing copy. It is how they execute your code.

AWS Lambda runs your function inside a container on a server in a specific region. When a request comes in from Tokyo and your Lambda is in us-east-1, that request travels across the Pacific Ocean, gets processed in Virginia, and the response travels back. That round trip adds 150-300ms of latency before your code even executes.

Cloudflare Workers runs your code on V8 isolates distributed across 300+ data centers worldwide. When that same Tokyo request arrives, it gets processed at the nearest Cloudflare edge node in Tokyo. The response leaves from Tokyo. Your cold start is measured in single-digit milliseconds because V8 isolates spin up dramatically faster than containers.

This is not a minor difference. For any application where response time matters (APIs, dynamic websites, authentication, redirects), edge execution changes the math entirely.

Cold Starts: The Silent Killer

Cold starts on AWS Lambda range from 100ms to over 1 second depending on runtime and package size. Node.js functions typically cold start in 200-400ms. Python is similar. Java and .NET can exceed 1 second easily. AWS offers Provisioned Concurrency to eliminate cold starts, but it costs extra and you are paying for idle capacity.

Cloudflare Workers cold starts are typically under 5ms. V8 isolates are lightweight by design. There is no container to boot, no runtime to initialize. Your code is ready almost instantly. We have measured this across our 220+ sites and the 95th percentile cold start is under 3ms.

Pricing: Where the Real Difference Lives

Serverless pricing is intentionally confusing. Let us simplify it.

MetricCloudflare Workers (Paid)AWS Lambda
Monthly base$5/monthPay per use (no base)
Requests included10 million/month1 million free tier
Cost per million requests$0.50$0.20 + compute time
Compute pricingIncluded in request price$0.0000166667/GB-second
Free tier100K requests/day1M requests/month + 400K GB-seconds
Data transfer OUTFree$0.09/GB after 100GB
Edge executionIncluded (300+ locations)Extra cost (Lambda@Edge or CloudFront)

The hidden cost with Lambda is data transfer. AWS charges $0.09 per GB for data leaving their network. If your API returns 1KB responses and handles 10 million requests per month, that is roughly 10GB of transfer, adding about $0.90. For larger payloads, this adds up fast. Cloudflare charges nothing for egress.

Our Real Numbers

Across 250+ websites handling over 4 million requests per month, our Cloudflare bill is $5. That is the Workers Paid plan. We use Workers for routing, redirects, API endpoints, HTML generation, and caching logic. If we replicated this on AWS with Lambda + API Gateway + CloudFront + Route 53 + ACM, our estimated monthly cost would be $40-80 depending on traffic patterns. The gap widens as traffic grows because Cloudflare's egress is free.

Performance Benchmarks

Theoretical numbers are nice. Here are real measurements from production workloads.

Simple JSON API Response

MetricWorkersLambda + API Gateway
Median latency (same region)8ms22ms
Median latency (cross-continent)12ms180ms
P99 latency25ms450ms
Cold start3ms250ms

The cross-continent difference is the biggest story. When your users are global, edge execution is not a luxury. It is a requirement for competitive performance.

HTML Page Generation

We generate HTML at the edge for many of our sites. A typical page generation (template rendering with dynamic data from KV) completes in 4-8ms on Workers. The equivalent on Lambda behind CloudFront would be 30-60ms for cached content, or 200-400ms on cache miss with origin fetch.

Developer Experience

AWS Lambda has a steep learning curve. You need to understand IAM roles, API Gateway configuration, CloudFormation or SAM templates, layer management, VPC configuration, and about a dozen other services that orbit Lambda. The AWS console is powerful but overwhelming.

Cloudflare Workers uses wrangler, a single CLI tool. Here is a complete deployment:

npm create cloudflare@latest my-worker
cd my-worker
# edit src/index.js
npx wrangler deploy

That is it. No IAM policy to write. No API Gateway to configure. No CloudFormation template. Your worker is live globally in under 30 seconds. Our deployment pipeline pushes updates to 220+ sites in minutes.

Local Development

Workers offers wrangler dev which runs a local server with the same V8 runtime used in production. This means local behavior matches production behavior almost exactly. Lambda's local story involves SAM CLI or third-party tools like Serverless Framework, and the local-to-production parity is never quite right because you are simulating a container environment.

Limits and Constraints

This is where honesty matters. Workers has real limitations that might disqualify it for your use case.

LimitWorkers (Paid)Lambda
Execution time30 seconds (HTTP), 15 min (Cron)15 minutes
Memory128MBUp to 10GB
Package size10MB compressed250MB uncompressed
RuntimeJavaScript/TypeScript/WASMNode, Python, Go, Java, .NET, Ruby, Rust
FilesystemNone/tmp (10GB)
Concurrent executionsNo hard limit1000 default (adjustable)

If you need to process large files, run long computations, or use languages beyond JavaScript/WASM, Lambda is your only option. Workers' 128MB memory limit means you cannot load large ML models or process huge datasets in memory. These are real constraints, not edge cases.

Storage and Databases

Both platforms have evolved their storage stories significantly.

Cloudflare's Storage Stack

AWS Storage Options

For complex applications needing relational databases, joins, transactions, and ACID compliance at scale, AWS still wins on the storage front. For simpler data patterns (key-value, object storage, basic SQL), Cloudflare's stack is more cost-effective.

When to Use Each Platform

Choose Cloudflare Workers When:

Choose AWS Lambda When:

Migration Tips From Lambda to Workers

If you are considering moving from Lambda to Workers, here is what we learned migrating 220+ sites:

  1. Start with stateless endpoints. API routes that do not need databases are the easiest to migrate. Redirects, transformations, and simple responses work perfectly.
  2. Replace environment variables with Workers secrets. The wrangler secret put command works similarly to Lambda environment variables but is encrypted at rest.
  3. Move S3 assets to R2. The S3-compatible API means most SDKs work with minimal changes. You immediately stop paying egress.
  4. Replace DynamoDB with KV for simple lookups. If you are only doing key-value reads, KV is simpler and cheaper. For complex queries, keep DynamoDB or evaluate D1.
  5. Test with wrangler dev extensively. Some Node.js APIs are not available in the Workers runtime. The node_compat flag helps but does not cover everything.

Our Verdict After 250+ Sites

For what we build (content sites, tools, APIs, and web applications), Cloudflare Workers is the clear winner. The combination of edge execution, simple deployment, free egress, and $5/month pricing makes it almost unfair. We serve millions of requests per month across 200+ Cloudflare zones and the platform has been rock solid.

That said, if we needed to run Python ML inference, process video files, or build complex event-driven architectures with Step Functions, we would use Lambda without hesitation. The platforms are not direct competitors for every workload. They overlap in the middle (simple APIs and web backends) and diverge at the edges (heavy compute vs. global edge).

The smart move for most developers in 2026: use Workers as your default for web-facing workloads and Lambda for heavy backend processing. You get the best of both worlds.

Build Your Stack for $5/Month

We built 650+ free developer tools running on Cloudflare Workers. Use them to build, test, and deploy your projects without subscription fees.

Browse Free Tools Start a Side Hustle

Related Tools on SPUNK.CODES

Secure Your Crypto While You Build

If you are building on Web3 or just holding crypto as a developer, hardware security matters. A Ledger hardware wallet keeps your keys offline. We use one for all our operational wallets.

Need a crypto exchange to convert earnings? Coinbase is the most straightforward on-ramp for developers who want to accept crypto payments.