Cloudflare Workers vs AWS Lambda: Real Costs on 10 Million Requests
We ran identical backend microservices on AWS Lambda and Cloudflare Workers for sixty days. The billing and cold start differences were night and day.
Serverless computing was supposed to eliminate infrastructure headaches. The pitch was simple: write a function, deploy it, and only pay for the exact milliseconds of compute you consume.
In practice, AWS Lambda comes with hidden traps: VPC cold starts, NAT Gateway egress charges, API Gateway surcharges, and minimum memory billing increments.
At Ryla Labs, our services process millions of webhook calls and data queries every month. To stop guessing which platform was more economical, we deployed identical production endpoints to AWS Lambda and Cloudflare Workers and routed 10 million real requests through both.
Cold Starts: V8 Isolates vs Docker Firecracker
The architectural difference between the two platforms explains why latency varies so wildly:
- AWS Lambda: Spins up an isolated Firecracker microVM. Even with modern optimizations, a cold start on a Node.js runtime typically takes between 250ms and 800ms.
- Cloudflare Workers: Does not use virtual machines. It runs on lightweight Google V8 Isolates distributed across hundreds of edge data centers. A cold start takes less than 5ms.
Cold Start Benchmark (P95 Latency):
AWS Lambda (Node 20, 512MB RAM): 420 ms
Cloudflare Workers (V8 Isolate): 4 ms
For real-time APIs where users expect sub-100ms responses, Cloudflare Workers wins hands down.
The Invoice Breakdown: 10 Million Requests
| Cost Factor | AWS Lambda + API Gateway | Cloudflare Workers Paid Plan |
|---|---|---|
| Request Volume Fee | $2.00 (Lambda invocation) | $5.00 (Base Workers plan) |
| API Gateway Charges | $35.00 (REST API gateway) | Included ($0.00) |
| Compute Duration Fee | $3.75 | Included in plan quota |
| Data Transfer Egress | $9.00 (AWS internet egress) | Included ($0.00) |
| Total Monthly Invoice | $49.75 | $5.00 |
The difference comes down to AWS API Gateway. Amazon charges $3.50 per million requests just to route incoming traffic to your Lambda function, which is often five times more expensive than the underlying compute itself.
Written by Daniel Dano
danieldano.com ↗15-year-old software developer, founder of Ryla Labs (50,000+ monthly users across 12 countries), author of Built Young, and high school student leader.