Cloudflare Workers vs Vercel Edge vs AWS Lambda: Pricing

This article contains affiliate links. We may earn a commission if you purchase through them, at no extra cost to you.

You’ve got a function that needs to run close to users. Maybe it’s auth middleware, an A/B testing router, a geolocation redirect, or a lightweight API. You know serverless or edge compute is the answer. But then you open the pricing pages for Cloudflare Workers, Vercel Edge Functions, and AWS Lambda and suddenly you need a spreadsheet, three cups of coffee, and a law degree to figure out what you’ll actually pay.

I’ve run all three in production. I’ve been surprised by bills on two of them. This article is the breakdown I wish existed when I started.

TL;DR — Quick Verdict

Platform Free Tier Best For Watch Out For
Cloudflare Workers 100K req/day, always free High-volume, latency-sensitive edge logic CPU time limits, no Node.js full compat on free
Vercel Edge Functions Bundled with Vercel plan Next.js apps, middleware, simple routing Execution time caps, costs scale with Vercel plan tier
AWS Lambda 1M req/month + 400K GB-s compute Complex backend logic, long-running tasks Data transfer costs, cold starts, Lambda@Edge pricing

Bottom line: For pure edge compute at scale, Cloudflare Workers wins on price — it’s not close. For Next.js teams who don’t want to think about infrastructure, Vercel Edge Functions are fine but you’re paying for the convenience. AWS Lambda is the right call when you need full runtime flexibility or are already deep in the AWS ecosystem — just don’t use Lambda@Edge unless you enjoy surprise invoices.

How I Evaluated These Platforms

I compared these platforms across five real workloads:

  • Auth middleware — JWT validation on every request, ~50ms execution, 5M requests/month
  • API route handler — fetching from a database, ~200ms execution, 500K requests/month
  • Image optimization proxy — CPU-intensive transforms, ~1s execution, 200K requests/month
  • Geolocation redirect — pure routing logic, ~5ms execution, 20M requests/month
  • Webhook processor — infrequent but bursty, ~2s execution, 50K requests/month

These aren’t hypothetical. They’re the actual use cases I’ve deployed across teams. Let’s dig into each platform.

Cloudflare Workers Pricing — The Honest Breakdown

Cloudflare Workers has the most developer-friendly pricing model of the three, and I say that as someone who is generally skeptical of “generous” free tiers.

Free Plan

  • 100,000 requests per day (that’s 3M/month)
  • 10ms CPU time per request (not wall-clock time — this is important)
  • 128MB memory
  • No credit card required

Workers Paid ($5/month)

  • 10 million requests included
  • $0.30 per additional million requests
  • 50ms CPU time per request (5x the free tier)
  • 30 million CPU milliseconds included, then $0.02 per additional million

For the geolocation redirect workload (20M requests/month, ~5ms CPU each): you’d pay $5 base + $3 for the extra 10M requests = $8/month. On AWS Lambda@Edge, the same workload costs roughly $50–80 depending on your region distribution. That’s a 6–10x difference.

The gotcha with Workers is the CPU time model. Cloudflare doesn’t charge for wall-clock time — they charge for actual CPU execution time. This is great for I/O-bound tasks (waiting on a fetch call doesn’t count). It’s brutal if you’re doing CPU-heavy work like crypto or image processing, because you’ll hit limits fast.

Workers also runs on Cloudflare’s global network — over 300 locations — which means you’re genuinely running at the edge, not just in a handful of AWS regions. For latency-sensitive use cases, this is a real advantage.

The hidden cost nobody talks about: Workers KV (key-value storage) charges $0.50/million reads and $5/million writes. If your workers are reading config or session data from KV on every request, that adds up. Budget for it separately.

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.

Vercel Edge Functions Pricing — Bundled, But Not Free

Vercel Edge Functions are the trickiest to price because they’re not sold standalone — they’re bundled into Vercel’s platform plans. This makes comparisons awkward.

Hobby Plan (Free)

  • Edge Function invocations: included (but limited to personal, non-commercial use)
  • Execution duration: 25 seconds max per invocation
  • Regions: limited

Pro Plan ($20/month per member)

  • 1,000,000 Edge Function invocations included
  • $2 per additional million invocations
  • Execution duration: 25 seconds max
  • Edge Middleware: unlimited invocations (this is the middleware that runs before your pages)

Enterprise

  • Custom pricing, negotiated per contract

Here’s the thing about Vercel Edge Functions: they’re powered by Cloudflare Workers under the hood (Vercel uses CF’s network). You’re essentially paying a markup for the Vercel DX layer. For a Next.js team that’s already on Vercel Pro, the included invocations are fine for middleware — but if you’re building a high-volume API on top of Edge Functions, you’ll hit the $2/million overage rate, which is 6.7x more expensive than Cloudflare’s $0.30/million.

The execution model is also different from Cloudflare. Vercel charges on invocations, not CPU time. For CPU-light, I/O-heavy functions, this can actually be more expensive than Workers. For CPU-heavy functions that stay within limits, it can be cheaper.

Where Vercel Edge genuinely wins: Middleware. Vercel’s Edge Middleware (the middleware.ts file in Next.js) runs on every request and is not counted toward your invocation limits on Pro plans. If you’re doing auth checks, bot detection, or A/B routing in middleware, this is effectively free after your plan cost.

If you’re evaluating where to host your Next.js project overall, I’d recommend reading our Best Cloud Hosting for Side Projects 2026 guide — it covers the full picture beyond just edge functions.

AWS Lambda Pricing — Powerful, But the Bill Has Layers

AWS Lambda is the OG serverless platform, and it’s genuinely powerful. It’s also the easiest one to get an unexpected bill from, because the pricing has more dimensions than the others.

Standard Lambda Pricing

  • Requests: $0.20 per million (first 1M free per month)
  • Duration: $0.0000166667 per GB-second (400,000 GB-seconds free per month)
  • Memory: 128MB to 10,240MB, you choose — you pay for what you allocate, not what you use

Lambda@Edge Pricing (the expensive one)

  • Requests: $0.60 per million (3x standard Lambda)
  • Duration: $0.00005001 per GB-second (3x standard Lambda)
  • Minimum memory: 128MB
  • Maximum execution time: 5 seconds for origin request/response, 30ms for viewer request/response

Lambda@Edge is what you use when you want Lambda logic running at CloudFront edge locations. And it is significantly more expensive than standard Lambda. I’ve seen teams accidentally deploy Lambda@Edge when they meant to use standard Lambda and get a 3x bill at the end of the month.

For our auth middleware workload (5M requests/month, 200ms execution, 256MB memory):

  • Standard Lambda: ~$1 for requests + ~$4.25 for duration = ~$5.25/month
  • Lambda@Edge: ~$3 for requests + ~$12.75 for duration = ~$15.75/month
  • Cloudflare Workers: $5 base + $0 (within CPU limits) = $5/month

Standard Lambda is competitive. Lambda@Edge is not.

The Hidden AWS Costs

AWS Lambda’s sticker price is misleading because you also pay for:

  • Data transfer out: $0.09/GB after the first GB. If your function returns large payloads, this adds up fast.
  • API Gateway: If you’re exposing Lambda via HTTP, you need API Gateway ($3.50/million for REST, $1/million for HTTP API). This often doubles your effective cost.
  • CloudWatch Logs: $0.50/GB ingested. Lambda logs everything by default. Turn this down in production.
  • VPC costs: If your Lambda needs to access RDS or ElastiCache inside a VPC, you might need NAT Gateway, which costs $0.045/hour + $0.045/GB. This can be your biggest Lambda cost by far.

The NAT Gateway trap is real. I’ve seen a Lambda-heavy architecture where the NAT Gateway bill was 4x the Lambda compute bill. Always check your VPC networking costs.

Side-by-Side Pricing Comparison

Workload Cloudflare Workers Vercel Edge Functions AWS Lambda (Standard) AWS Lambda@Edge
Auth middleware (5M req/mo, 50ms CPU) $5/mo ~$13/mo (Pro + overages) ~$5.25/mo ~$15.75/mo
Geo redirect (20M req/mo, 5ms CPU) $8/mo ~$51/mo ~$4/mo (no edge) ~$52/mo
API handler (500K req/mo, 200ms) $5/mo $20/mo (Pro plan) ~$2/mo ~$6/mo
Webhook processor (50K req/mo, 2s) $5/mo (CPU limit risk) $20/mo (Pro plan) ~$1/mo ~$3/mo
Image proxy (200K req/mo, 1s CPU-heavy) $5/mo (hits CPU limits) $20/mo (Pro plan) ~$3/mo ~$9/mo

Note: Vercel costs assume a single-person team on Pro. AWS costs exclude API Gateway, data transfer, and CloudWatch. Real bills will vary.

Runtime Capabilities — What You Can Actually Do

Pricing isn’t the only axis. These platforms have real capability differences that should drive your decision.

Cloudflare Workers

  • V8 isolates, not Node.js — most npm packages work, but not all (no native modules)
  • Workers AI, R2 (object storage), D1 (SQLite), Queues — a growing ecosystem
  • No cold starts (isolates spin up in microseconds)
  • 10ms CPU limit on free tier is genuinely restrictive for complex logic
  • WebAssembly support is excellent

Vercel Edge Functions

  • Also V8 isolates (same underlying tech as Workers)
  • Tight Next.js integration — middleware.ts just works
  • Limited to a subset of Web APIs (no full Node.js)
  • No persistent storage at the edge (you call out to your database)
  • Best-in-class DX if you’re already on Vercel

AWS Lambda

  • Full Node.js, Python, Go, Java, Ruby, .NET — real runtime flexibility
  • Up to 15 minutes execution time (vs. seconds on edge)
  • 10GB memory available
  • Cold starts are real (50ms–2s depending on runtime and package size)
  • Access to the entire AWS ecosystem (RDS, DynamoDB, SQS, etc.)
  • Lambda@Edge is limited to 128MB–10GB memory, 5s max at origin

Use Cases — Pick the Right Tool

Use Cloudflare Workers if you need:

  • Maximum request volume at minimum cost (nothing beats $0.30/million)
  • True global edge distribution (300+ PoPs)
  • Zero cold starts
  • I/O-bound logic (auth, routing, header manipulation, API proxying)
  • A standalone edge platform not tied to a frontend framework

Use Vercel Edge Functions if you need:

  • Next.js middleware that just works without thinking about it
  • A single platform for your frontend + edge logic
  • Low-to-medium request volumes (under 5M/month on Pro)
  • Fast iteration with preview deployments

Use AWS Lambda if you need:

  • Long-running functions (more than a few seconds)
  • Full Node.js or non-JS runtimes (Python, Go, etc.)
  • Deep AWS integrations (SQS triggers, DynamoDB streams, S3 events)
  • More than 128MB memory for compute-heavy work
  • Infrequent, bursty workloads where cold starts are acceptable

If you’re running a side project and cost is the primary concern, I’d suggest reading our Best Cloud Hosting for Side Projects 2026 guide alongside this one — edge functions are often just one piece of the infrastructure puzzle. And if you’re considering migrating between platforms, our piece on migrating 14 projects in one weekend covers the real pain points of platform switches.

Pricing Gotchas Summary — The Things That Bite You

  • Cloudflare Workers KV: $5/million writes. If you’re writing session data on every auth, you’ll notice this.
  • Vercel Pro is per-seat: A 3-person team pays $60/month before you’ve run a single function. The included invocations don’t go as far as they look.
  • AWS Lambda@Edge vs. Standard Lambda: Always check which one your framework is deploying. Next.js on AWS (via SST or Amplify) sometimes defaults to Lambda@Edge. That’s a 3x price difference.
  • AWS API Gateway: You almost certainly need it with Lambda, and it almost doubles your cost. Use HTTP API (not REST API) — it’s 70% cheaper for most use cases.
  • AWS NAT Gateway: If your Lambda is in a VPC, this will probably be your biggest line item. Use VPC endpoints where possible.
  • Cloudflare CPU time vs. wall time: A function that does 10ms of work but waits 500ms for a database response only costs you the 10ms. Know this and design accordingly.

Final Recommendation — Here’s What I’d Actually Do

If I’m starting a new project today and need edge compute, here’s my decision tree:

Building a Next.js app on Vercel? Use Edge Middleware for routing/auth (it’s free in Pro), and don’t overthink it. Don’t use Edge Functions as a general API layer — the cost per invocation is too high at scale.

Need high-volume, low-latency edge logic that’s framework-agnostic? Cloudflare Workers. The pricing is genuinely the best in the category, the global network is real, and the DX has improved dramatically. The CPU time model rewards efficient code, which is a good forcing function anyway.

Need full runtime power, long execution, or deep AWS integration? Standard Lambda. Just avoid Lambda@Edge unless you have a specific reason, use HTTP API Gateway instead of REST, and watch your VPC costs like a hawk.

The honest answer for most teams: You’ll end up using two of these. Cloudflare Workers for edge routing and auth. Standard Lambda for backend business logic. Vercel Edge Functions only if you’re already committed to the Vercel platform. That’s not a cop-out — it’s how production architectures actually work.

If you’re also evaluating where to host your databases and application servers alongside these functions, check out our comparison of DigitalOcean vs Hetzner vs Vultr — sometimes a $6/month VPS is still the right answer for certain workloads. And if you’re using AI tools to help build and document these systems, our Best AI Tools for Developers in 2026 roundup covers what’s actually worth paying for.

The serverless and edge compute space moves fast. Cloudflare in particular ships features at an aggressive pace — Workers AI, D1, Queues, and Hyperdrive have all landed in the last two years. Check current pricing pages before making a long-term commitment, because the numbers I’ve cited here will drift. The relative rankings, though? Those tend to be stickier.

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.

Leave a Comment

Stay sharp.

A weekly breakdown of the tools worth your time — and the ones that aren't.

Join 500+ developers. No spam ever.