# Serverless function cost worksheet A plain worksheet for working out what your website's functions cost each month on AWS Lambda directly, on Netlify, on Vercel and on Cloudflare Workers, using your own numbers. It goes with the jwatte.com article "AWS Lambda Runs Under a Lot of Serverless Hosting" (https://jwatte.com/blog/aws-lambda-serverless-resellers-markup/). Rates were read from each vendor's own pricing page on 2026-10-31 and 2026-11-01. Vendors change them; re-check the sources at the bottom before you make a decision. ## 1. Inventory your functions Your host's usage screen shows these (Netlify: the Functions and Usage pages; Vercel: Usage and Observability). Fill one row per function. | Function name | What it does | Calls per month | Average duration (ms) | Memory (MB) | Mostly computing or mostly waiting? | |---|---|---|---|---|---| | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Mostly waiting" means most of its time is spent on a call to something else: a database, an AI model, a payment provider, an email service. ## 2. The formulas For each function: - **GB-seconds** = calls x (duration in ms / 1,000) x (memory in MB / 1,024) - **GB-hours** = GB-seconds / 3,600 - **CPU-hours** (Vercel, Workers) = calls x (milliseconds of real computation / 1,000) / 3,600 Then price it: | Platform | Formula | Rates (checked 2026-10-31 / 2026-11-01) | |---|---|---| | AWS Lambda (x86, US East) | requests x $0.20 per million + GB-seconds x $0.0000166667 | Free each month: 1 million requests and 400,000 GB-seconds | | Netlify credit plans | GB-hours x 10 credits; add 2 credits per 10,000 web requests | Memory is billed as configured; 1,024 MB minimum. Free: 300-credit limit. Personal: $9 for 1,000 credits. Pro: $20 for 3,000 credits | | Vercel Pro (iad1, cle1, pdx1) | CPU-hours x $0.128 + memory GB-hours x $0.0106 + invocations x $0.60 per million | Pro is $20 a month with $20 of usage credit. Hobby is non-commercial only | | Cloudflare Workers Paid | $5 minimum; 10 million requests and 30 million CPU milliseconds included; then $0.30 per million requests and $0.02 per million CPU milliseconds | Bills CPU time, not waiting time | Lambda bills wall-clock time: waiting costs the same as computing. Vercel's Active CPU and Cloudflare Workers bill computation only. That one difference decides most comparisons for functions that call AI models. ## 3. Worked example to copy A product-description function: 50,000 calls a month, 6 seconds each (mostly waiting on an AI API), 1,024 MB, about 50 ms of real computation per call. - GB-seconds: 50,000 x 6 x 1 = 300,000 - GB-hours: 300,000 / 3,600 = 83.3 - **Lambda:** 300,000 x $0.0000166667 = $5.00, plus 0.05 million x $0.20 = $0.01. About $5.01, or $0 if the free tier covers it. - **Netlify:** 83.3 x 10 = 833 credits, plus 50,000 / 10,000 x 2 = 10 credits. About 843 of the Personal plan's 1,000. - **Vercel Pro:** CPU 50,000 x 0.05 s = 2,500 s = 0.69 h x $0.128 = $0.09; memory 83.3 x $0.0106 = $0.88; invocations 0.05 x $0.60 = $0.03. About $1.00. ## 4. Your totals | Function | Lambda $ | Netlify credits | Vercel Pro $ | Workers $ | |---|---|---|---|---| | | | | | | | | | | | | | **Total** | | | | | Add the plan fee you already pay. For most small sites the plan fee is the bill and the functions are a rounding error; the point of the worksheet is to find the one function that is not. ## 5. The five bills that surprise owners - [ ] **Allocated memory, not used memory.** Netlify bills at the configured size, with 1,024 MB as the minimum. A 20 ms form handler and a 6-second AI call are billed at the same memory. - [ ] **Waiting time on wall-clock meters.** On Lambda and Netlify, a function waiting six seconds for an AI answer pays for all six seconds. - [ ] **Production deploys on Netlify credit plans.** 15 credits each. Twenty deploys a month is 300 credits, the entire Free plan limit. Preview deploys are free. - [ ] **Cold starts on Lambda.** Since August 1, 2025, the initialization phase is billed for on-demand ZIP-packaged functions. - [ ] **A business site on Vercel Hobby.** Hobby is "non-commercial personal use only"; being paid to build or host the site counts as commercial. - [ ] **Scheduled jobs that outgrow their limit.** Netlify scheduled functions stop at 30 seconds; long reports need a background function (15 minutes). - [ ] **Functions nobody remembers.** List them all once a quarter and delete the ones with no purpose. - [ ] **Bandwidth and requests, not functions.** On Netlify, bandwidth is 20 credits per GB and web requests 2 credits per 10,000. On a busy brochure site these move the bill far more than functions. ## 6. Prompts for your AI assistant Paste one of these into ChatGPT, Claude or whichever assistant you already use, and attach what it asks for. ```text I am attaching my hosting platform's function usage export. For each function, list monthly invocations, average duration in milliseconds and allocated memory in MB. Then compute GB-seconds (invocations x duration in seconds x memory in GB) and price each function on these rates, which I checked on 2026-11-01: AWS Lambda $0.20 per million requests plus $0.0000166667 per GB-second (free tier 1M requests and 400,000 GB-seconds a month); Netlify 10 credits per GB-hour of allocated memory; Vercel Pro $0.128 per active CPU-hour, $0.0106 per GB-hour of provisioned memory, $0.60 per million invocations. Show the arithmetic for each line. If a field is missing from the export, say so and do not guess. ``` ```text Here is the source code of my serverless functions. For each one, list every network call it makes (database, AI model, payment provider, email service), estimate what share of its run time is spent waiting on those calls versus computing, and say whether a platform that bills only active CPU time would cost less than one that bills wall-clock time. Say how confident you are in each estimate and what log data would confirm it. ``` ```text This function runs about [N] times a month, averages [X] ms and is allocated [Y] MB. Here is its code. What is the smallest memory setting that would run it reliably, what would that save per month at $0.0000166667 per GB-second, and what could break if I lower it (timeouts, slower CPU, large libraries)? Tell me how to test the change safely before I make it. ``` ```text Here is how my business uses this website: [describe: do you sell, take bookings, run ads, pay a developer]. Here is the hosting platform's fair-use or commercial-use policy text: [paste it]. Tell me whether my use counts as commercial under that exact wording, quote the sentences that decide it, and say what plan the policy requires. If the wording is ambiguous for my case, say so. ``` ## Sources - AWS Lambda pricing: https://aws.amazon.com/lambda/pricing/ - AWS Lambda memory and CPU: https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html - AWS initialization billing change: https://aws.amazon.com/blogs/compute/aws-lambda-standardizes-billing-for-init-phase/ - Netlify functions configuration (limits, memory): https://docs.netlify.com/build/functions/configuration/ - Netlify credit rates: https://docs.netlify.com/manage/accounts-and-billing/billing/billing-for-credit-based-plans/how-credits-work/ - Netlify plans: https://www.netlify.com/pricing/ - Vercel function pricing: https://vercel.com/docs/functions/usage-and-pricing - Vercel plans: https://vercel.com/pricing - Vercel fair use (Hobby is non-commercial): https://vercel.com/docs/limits/fair-use-guidelines - Cloudflare Workers pricing: https://developers.cloudflare.com/workers/platform/pricing/ This worksheet is informational, not financial or hosting-consulting advice. Mentions of vendors are nominative fair use; no affiliation is implied.