This article contains affiliate links. We may earn a commission if you click through and make a purchase — at no extra cost to you.
You’re building something that needs to run fast, close to users, and without managing servers. You’ve narrowed it down to Cloudflare Workers, Vercel Edge Functions, or AWS Lambda. Now you’re staring at three pricing pages that all use different units, different billing models, and just enough asterisks to give you a headache. I’ve been there. I’ve also gotten surprise bills from two of these three, so let me save you the pain.
This isn’t a theoretical comparison. I’ve shipped production workloads on all three — API middleware on Cloudflare Workers, ISR-heavy Next.js apps on Vercel, and event-driven pipelines on Lambda. Here’s what the pricing actually looks like when real traffic hits.
TL;DR — Quick Verdict
- Cloudflare Workers — Best overall value for most use cases. Generous free tier, predictable pricing, globally distributed by default. My first pick for edge API work.
- Vercel Edge Functions — Great if you’re already on Vercel for Next.js. Terrible if you’re not. Pricing gets painful at scale and the limits are aggressive.
- AWS Lambda — Most powerful and flexible, but the pricing complexity and cold start management overhead are real costs you don’t see on the pricing page. Best for complex event-driven workloads already in the AWS ecosystem.
How Each Platform Actually Charges You
Before getting into numbers, you need to understand that these platforms don’t even measure the same things. Comparing them directly requires a translation layer.
Cloudflare Workers: Requests + CPU Time
Cloudflare charges per request and per CPU millisecond — not wall-clock time. This is a huge deal. If your Worker makes a 200ms fetch to an external API but only uses 5ms of CPU, you’re billed for 5ms. On Lambda, you’d be billed for the full 200ms.
Free tier: 100,000 requests/day, 10ms CPU time per request. Resets daily. This is legitimately useful for side projects and low-traffic tools.
Paid (Workers Standard — $5/month):
- 10 million requests/month included
- 30 million CPU milliseconds/month included
- $0.30 per additional million requests
- $0.02 per additional million CPU milliseconds
Workers KV (key-value storage), Durable Objects, R2, and D1 are all billed separately but are generally competitive. The $5/month base is a flat fee — you’re not paying per-seat or per-project.
Vercel Edge Functions: Execution Units
Vercel introduced “Edge Middleware” and “Edge Functions” and they’re not the same thing, which is already annoying. Edge Middleware runs on every request (before routing), Edge Functions are invoked explicitly. Both run on the Vercel Edge Network (built on Cloudflare Workers under the hood, ironically).
Vercel bills in Edge Function Execution Units, where 1 unit = 1ms of execution time. But the billing is tied to your plan, not a simple per-unit cost.
Hobby (free): 500,000 Edge Middleware invocations/month, limited Edge Function execution. Fine for personal projects, blocked for commercial use per ToS.
Pro ($20/user/month):
- 1,000,000 Edge Middleware invocations included
- 500,000 Edge Function execution units included
- $2 per additional million Edge Middleware invocations
- $0.60 per million additional execution units
Enterprise: Custom pricing, custom limits. Translation: call us when you’re spending real money.
The $20/user/month model is where Vercel gets expensive for teams. A 5-person team is $100/month before you’ve written a line of code. And that’s just for the platform — bandwidth, build minutes, and Serverless Function invocations (regular Lambda-backed functions) are separate line items.
AWS Lambda: Duration + Requests + Everything Else
Lambda’s pricing has three components you always pay, and several you might forget about:
Always billed:
- Requests: $0.20 per million (first 1M free/month)
- Duration: $0.0000166667 per GB-second (first 400,000 GB-seconds free/month)
- Memory: You configure 128MB–10GB. You pay for what you allocate, not what you use.
Easy to forget:
- Data transfer out: First 1GB free, then $0.09/GB to the internet. This adds up fast on APIs returning large payloads.
- API Gateway: If you’re exposing Lambda via HTTP (which you almost certainly are), add $3.50/million API calls for REST API, or $1.00/million for HTTP API.
- CloudWatch Logs: $0.50/GB ingested. Lambda logs everything by default. At scale, this is non-trivial.
- Provisioned Concurrency: If you’re solving cold starts with provisioned concurrency, you’re paying even when idle.
Lambda’s free tier is the most generous on paper (1M requests, 400K GB-seconds), but the real-world cost picture is messier than the headline numbers suggest.
Real-World Pricing Scenarios
Abstract numbers are useless. Here are three concrete scenarios with actual cost estimates.
Scenario 1: API Middleware — 10 Million Requests/Month, ~5ms avg execution
Think: auth token validation, request logging, rate limiting. Short, CPU-light work.
| Platform | Monthly Cost | Notes |
|---|---|---|
| Cloudflare Workers | ~$5 | Included in $5 plan. 10M requests + 50M CPU ms = well within limits. |
| Vercel Edge Functions | ~$38 | $20 Pro plan + overage on invocations (9M over the 1M included). |
| AWS Lambda + HTTP API | ~$12–18 | ~$0 Lambda (within free tier) + $10 HTTP API Gateway + ~$2–8 CloudWatch + data transfer. |
Winner: Cloudflare Workers, by a lot.
Scenario 2: Image Processing — 1 Million Requests/Month, ~500ms avg, 512MB memory
Think: on-demand image resizing, PDF generation, heavy compute tasks.
| Platform | Monthly Cost | Notes |
|---|---|---|
| Cloudflare Workers | Not suitable | Workers have a 128MB memory limit and CPU time limits. Heavy image processing will hit walls. |
| Vercel Edge Functions | Not suitable | Edge Functions have a 25MB response limit and tight CPU constraints. Use Serverless Functions instead. |
| AWS Lambda | ~$15–25 | 0.5GB × 0.5s × 1M = 250,000 GB-seconds. After free tier: ~$4.17 Lambda + API Gateway + egress. |
Winner: AWS Lambda — it’s the only one that can actually do this job. For heavy compute, Lambda’s flexibility with memory (up to 10GB) and execution time (up to 15 minutes) is unmatched. Cloudflare and Vercel Edge are built for fast, lightweight work.
Scenario 3: Next.js App with Edge Middleware — 5 Million Page Views/Month
Think: a real SaaS product running Next.js, with auth middleware on every request.
| Platform | Monthly Cost | Notes |
|---|---|---|
| Cloudflare Workers + Pages | ~$5–20 | Possible but requires adapting Next.js for Cloudflare. Not plug-and-play. |
| Vercel (native) | ~$60–120 | Pro plan + middleware overages + Serverless Function invocations for SSR. Scales poorly. |
| AWS Lambda + CloudFront | ~$30–60 | OpenNext or SST required. More setup, more control. CloudFront adds cost but also caching. |
Winner: Depends on your team’s time budget. Vercel is the easiest but most expensive. AWS with SST/OpenNext is the cheapest at scale but takes real setup time. If you’re evaluating cloud hosting options more broadly, our best cloud hosting for side projects guide covers more alternatives including traditional VPS options that might beat all three for certain workloads.
Get the dev tool stack guide
A weekly breakdown of the tools worth your time — and the ones that aren’t. Join 500+ developers.
No spam. Unsubscribe anytime.
The Hidden Costs Nobody Puts in the Headline
Cold Starts
Cloudflare Workers don’t have cold starts in the traditional sense — they use the V8 isolate model, not containers. Startup time is measured in microseconds. This is a genuine architectural advantage.
Vercel Edge Functions inherit this benefit (again, Cloudflare under the hood). Regular Vercel Serverless Functions (Lambda-backed) do have cold starts.
AWS Lambda cold starts range from ~100ms (Node.js/Python) to 1–3 seconds (Java/.NET without SnapStart). If you’re serving latency-sensitive traffic, you either accept cold starts or pay for Provisioned Concurrency — which can easily double your Lambda costs.
Egress Costs
Cloudflare has no egress fees between Workers and R2 (their object storage). Data out to the internet from Workers is included. This is a significant advantage if you’re serving assets or large API responses.
AWS charges $0.09/GB out to the internet. On a media-heavy API returning 500GB/month of data, that’s $45 just in egress before you’ve counted anything else.
Vercel’s bandwidth is included in plans up to certain limits, then $0.15/GB. Check your plan’s bandwidth cap before assuming it’s free.
Developer Experience Tax
This is a real cost even if it doesn’t show up on an invoice. Lambda’s local development story requires either SAM, Serverless Framework, or AWS CDK — all of which have learning curves and occasional friction. Debugging Lambda in production means CloudWatch, which is functional but not pleasant.
Cloudflare Workers’ local dev with Wrangler is genuinely good. wrangler dev gives you a near-identical local environment. Deployment is fast.
Vercel wins on DX for Next.js, full stop. If you’re building Next.js, the zero-config deployment and preview environments are worth something real. The question is whether they’re worth the pricing premium.
Platform Limits That Will Bite You
| Limit | Cloudflare Workers | Vercel Edge Functions | AWS Lambda |
|---|---|---|---|
| Max execution time | 30s (wall), CPU limits vary | 30s | 15 minutes |
| Max memory | 128MB | 128MB | 10GB |
| Max bundle size | 10MB (compressed) | 4MB | 250MB (unzipped) |
| Max response size | Streaming supported | 25MB | 6MB (sync), streaming via response streaming |
| Runtime | V8 isolates (JS/WASM) | V8 isolates (JS/WASM) | Node, Python, Java, Go, Ruby, .NET, custom |
| Regions | 300+ PoPs globally | ~70+ regions | 33 regions (you choose) |
The runtime column is important. Workers and Vercel Edge both run V8 isolates — you’re writing JavaScript (or TypeScript, or WASM). You can’t run Python scripts, shell commands, or native binaries. Lambda supports all of that. If your workload needs anything beyond JavaScript, Lambda is your only option of the three.
Who Should Use What
Use Cloudflare Workers if:
- You’re building API middleware, auth layers, or request transformation logic
- You need global low latency without thinking about region selection
- You want predictable pricing that won’t surprise you
- You’re comfortable with JavaScript/TypeScript and don’t need other runtimes
- You’re building a standalone edge API (not tied to a specific frontend framework)
Use Vercel Edge Functions if:
- You’re already deployed on Vercel and building with Next.js
- You want zero-config edge middleware without leaving the Vercel ecosystem
- Your team is small (1–3 devs) and the $20/user/month isn’t a concern yet
- You’re prototyping and want the fastest path to a working product
Use AWS Lambda if:
- You need execution times beyond 30 seconds
- You need more than 128MB of memory
- You’re running Python, Java, Go, or any non-JavaScript runtime
- You’re already deep in the AWS ecosystem (SQS, SNS, DynamoDB triggers, etc.)
- You need fine-grained IAM control and compliance requirements that demand AWS
- You’re processing files, running ML inference, or doing anything compute-heavy
Pricing Summary Table
| Cloudflare Workers | Vercel Edge Functions | AWS Lambda | |
|---|---|---|---|
| Free tier | 100K req/day | 500K invocations/month (non-commercial) | 1M req + 400K GB-s/month |
| Entry paid | $5/month flat | $20/user/month | Pay-as-you-go (no minimum) |
| 10M req/month | ~$5 | ~$38+ | ~$12–20 (with API GW) |
| Egress fees | None | After plan limit | $0.09/GB |
| Cold starts | None (isolates) | None (isolates) | Yes (100ms–3s) |
| Pricing predictability | ★★★★★ | ★★★☆☆ | ★★☆☆☆ |
My Honest Recommendation
If you’re starting a new project today and you’re not locked into an existing ecosystem: start with Cloudflare Workers. The $5/month plan covers more traffic than most projects will ever see, the pricing is transparent, there are no cold starts, and the global distribution is automatic. I’ve moved three personal projects off Lambda to Workers in the past year and haven’t looked back.
If you’re building a Next.js app on Vercel: use Edge Functions for what they’re good at (auth middleware, geolocation routing, A/B testing) but don’t treat them as a general-purpose compute layer. Watch your invocation counts and set billing alerts the moment you go Pro.
If you’re in AWS already and need real compute power — longer runtimes, more memory, non-JS runtimes, native AWS integrations — Lambda is still the right answer. Just budget for API Gateway, CloudWatch, and egress costs from day one, or you’ll be confused when your bill is 2x what you expected.
For teams evaluating the broader infrastructure picture, it’s worth reading our comparison of DigitalOcean vs Hetzner vs Vultr — sometimes a $6/month VPS with a reverse proxy beats all three of these platforms for simple, consistent workloads. And if you’re migrating between platforms, the hard lessons from mass-migrating 14 projects in a weekend apply here too.
The serverless edge space is moving fast. Cloudflare’s roadmap (Durable Objects, D1, Queues, AI Workers) is genuinely exciting and they’re shipping at a pace that AWS and Vercel aren’t matching right now. For most developers building in 2026, Cloudflare Workers is where I’d put my money — literally.
Get the dev tool stack guide
A weekly breakdown of the tools worth your time — and the ones that aren’t. Join 500+ developers.
No spam. Unsubscribe anytime.