Serverless marketing leads with “pay only for what you use” and a tiny per-request price. Then the bill arrives and it’s nothing like the headline rate. Here’s where the money actually goes.
1. GB-seconds from over-provisioned memory
The biggest line on most serverless bills is GB-seconds = requests × duration × memory. Allocate 1 GB when 256 MB would do, and you’ve quadrupled your compute cost for nothing. Right-sizing memory is the single highest-leverage optimisation — see the cheapest-per-GB-second ranking.
2. Egress
| Platform | Egress |
|---|---|
| Cloudflare Workers | $0 |
| AWS Lambda | ~$0.09/GB after 100 GB free |
| Google Cloud Run | tiered, billed separately |
| Vercel | $0.06/GB Fast Origin Transfer |
Snapshot captured June 2026. For a content- or API-heavy app, egress can exceed compute. Cloudflare’s zero-egress policy is a genuine structural advantage.
3. The AWS extras: API Gateway and NAT Gateway
On AWS, Lambda is often fronted by API Gateway (billed per request and per GB) and runs in a VPC behind a NAT Gateway (hourly + per-GB). Neither is in the Lambda price. They routinely double a “cheap” Lambda bill.
4. Platform minimums
- Cloudflare Workers Paid: $5/mo minimum.
- Vercel Pro: $20/seat/mo before usage.
- Deno Deploy Pro / Modal: credit-based; credits run out.
Below a certain scale these fixed costs dominate, so the “cheapest per request” platform isn’t always the cheapest overall.
5. Wall-clock vs CPU-time billing
Platforms that bill wall-clock GB-seconds (Lambda, Azure Functions) charge you while the function waits on I/O. Platforms that bill CPU time (Cloudflare Workers, Vercel active CPU) don’t. For I/O-bound endpoints that’s a large, invisible difference. See cold starts and pricing models.
Bottom line
Model the whole bill, not the sticker rate. Estimate yours with the calculator, and read when serverless is cheaper than a VPS before assuming serverless is always the cheap option.