GUIDE SERVERLESS 2026

AWS Lambda Cost Calculator 2026: Serverless Pricing Compared

2026-06-03 · 12 min read · APICalculators

Serverless billing is notoriously hard to predict. This guide breaks down AWS Lambda, Vercel Functions, Cloudflare Workers and GCP Cloud Functions pricing with real cost tables so you can budget before you deploy.

How Serverless Pricing Works

Every serverless platform charges on two dimensions: invocations (how many times your function runs) and compute (GB-seconds = memory × duration). AWS Lambda gives 1M free invocations + 400K GB-sec free per month. Cloudflare Workers charges $0.50/M requests with no GB-sec fee.

2026 Serverless Cost Table

PlatformPer invocationPer GB-secFree tier
Cloudflare Workers$0.50/M$0.000012100K req/day
AWS Lambda$0.20/M$0.00001661M req + 400K GB-sec
GCP Cloud Functions$0.40/M$0.0000252M req + 400K GB-sec
Vercel Functions$0.40/M$0.000018100GB-hr/month

AWS Lambda: Best for AWS Ecosystem

Lambda integrates natively with API Gateway, S3, DynamoDB and EventBridge. At 10M invocations × 150ms × 256MB: approximately $1.67 compute + $1.80 invocation = $3.47/mo after free tier. Perfect for event-driven architectures.

🧮 Try the calculator

Enter your numbers — get instant cost estimate.

Open Calculator →

Cloudflare Workers: Cheapest for High-Frequency APIs

Workers runs at the edge (200+ PoPs globally), starts at $5/mo for 10M requests, with no cold starts and sub-millisecond execution. For APIs under 50ms duration, Workers is often 10× cheaper than Lambda.

Real Cost: 10M Requests Per Month

Platform1M req10M req100M req
Cloudflare Workers$0$5$50
AWS Lambda (256MB/150ms)$0$3.47$34.70
GCP Cloud Functions$0$4.10$41
Vercel Functions$0.40$4.00$40

Real-World Cost Examples

Abstract pricing tables only go so far. Here are three realistic workloads with exact numbers.

Example 1: REST API — 10M requests/month, 256 MB, 200 ms avg

Cost componentCalculationMonthly cost
Invocations (after 1M free)9M × $0.20/M$1.80
Compute GB-sec (after 400K free)10M × 0.2s × 0.25 GB × $0.0000166$0.83
Lambda total$2.63
Cloudflare Workers (Paid)$5 flat covers 10M req$5.00

Winner: Lambda — REST APIs at this scale land well under $5/mo thanks to the free tier.

Example 2: Image Processing — 1M requests/month, 1024 MB, 2000 ms avg

Cost componentCalculationMonthly cost
Invocations (within free tier)1M — 1M free = 0$0.00
Compute GB-sec1M × 2s × 1 GB × $0.0000166$33.20
Lambda total$33.20
Cloudflare WorkersNot suitable — 50 ms CPU cap on free, 30 s on paid but no GPU

Winner: Lambda — the only sensible choice for compute-heavy workloads. Workers' CPU wall clock limit disqualifies it here.

Example 3: High-Frequency Edge API — 100M requests/month, 30 ms avg

PlatformCost breakdownMonthly total
Lambda + API Gateway$18 Lambda + $35 API GW$53.00
Cloudflare Workers$5 base + 90M × $0.50/M$50.00
Vercel Functions$40 + egress~$45–60

Winner: Cloudflare Workers — at 100M short requests the Workers flat pricing wins, especially once you factor in API Gateway costs Lambda accrues.

Hidden Costs Most Tutorials Skip

The Lambda pricing page shows two numbers: invocations and GB-seconds. Your actual invoice will include several more line items that tutorials rarely mention.

Rule of thumb: multiply your raw Lambda estimate by 1.5–2× to account for API Gateway and logging before presenting it to stakeholders.

When to Choose Lambda vs Alternative

No single serverless platform wins every workload. Use this decision table to match your use case to the right tool.

Use caseBest pickWhyMonthly cost (10M req)
Short API (<50 ms)Cloudflare WorkersNo cold starts, edge PoPs, flat pricing$5
AWS-integrated backendLambdaNative S3/DDB/SQS triggers, IAM$3–6
Next.js / React SSRVercel FunctionsZero-config deploy, built-in CDN$20+ (Pro)
Image / video processingLambda (1–10 GB)High memory, long timeout (15 min)$30–150
Global low-latency APIWorkers or GCP200+ PoPs, sub-ms routing$5–15
Scheduled jobs / cronLambda + EventBridgeNative cron, pay-per-execution<$1
ML inference (>3 GB)VPS or Lambda SnapStartLambda max 10 GB RAM; VPS cheaper at scale$10–80

If your function duration consistently exceeds 500 ms and you run more than 5M invocations per month, a $6 VPS may undercut Lambda on total cost once you factor in API Gateway.

FAQ

How much does AWS Lambda cost per million requests?

AWS Lambda costs $0.20 per million invocations after the free tier (1M/month). Compute costs add $0.0000166725 per GB-second. A 256MB function running 150ms costs ~$0.000000634 per invocation.

Is Cloudflare Workers cheaper than Lambda?

For short-duration, high-frequency functions: yes. Workers at $0.50/M requests with no GB-sec charge beats Lambda for APIs under 30ms. For longer compute (>500ms), Lambda may be cheaper.

What is serverless cold start cost?

Cold starts themselves are free — you only pay for execution time. But cold starts increase duration (50–500ms extra), which increases your GB-sec cost. Cloudflare Workers has no cold starts.

🧮
APICalculators

APICalculators Team · Free developer cost tools. Prices from official documentation, reviewed monthly.