—request cost
—compute (GB-s)
—per year
GB-seconds punish fat, slow functions
Serverless rewards small memory and fast execution; over-provisioning quietly doubles the bill. Trim both. For constant load compare the container hosting calculator.
Reading a serverless bill before it exists
Lambda-style pricing multiplies three inputs: requests ($0.20/million), GB-seconds of compute (~$0.0000167), and — the one people forget — everything around the function: API Gateway ($1+/million requests, often costing more than the Lambda it fronts), CloudWatch log ingestion, and cross-AZ data transfer. A 512MB function running 200ms a million times costs about $1.87 in compute; the gateway in front of it costs $1–$3.50. Serverless is cheapest for spiky, low-duty-cycle loads; past roughly 30–40% sustained utilization, a small container on a fixed VM undercuts it.
Message Queue (SQS) Cost CalculatorS3 Request Cost CalculatorContainer Hosting CostCAPTCHA Solving CostWeb Scraping API Cost
How this calculator works
This calculator estimates your monthly serverless function bill by combining two charges: a per-request cost and a compute cost. It multiplies your invocations per month by the price per 1M requests to get the request charge, then computes GB-seconds from your memory allocation and average duration — memory in gigabytes multiplied by run time in seconds, across every invocation — and multiplies that by your price per GB-second. The three biggest drivers are how often the function runs, how much memory it holds, and how long each call takes, so a small change in duration or memory can move the total noticeably at scale.
The key trade-off is memory versus duration. Allocating more memory raises the per-GB-second rate you pay, but it often shortens execution time, so a higher memory setting can sometimes lower the total compute cost rather than raise it. Use the calculator to test a few memory levels against realistic durations before assuming that the smallest setting is the cheapest. Also remember that request charges scale purely with volume, so at very high invocation counts the flat per-request cost can rival compute — worth checking both lines separately.
Frequently asked questions
How is serverless priced?
Two meters: a flat charge per million requests, plus GB-seconds (memory allocated × execution time). Over-provisioning memory or writing slow functions inflates the GB-second half — often the larger one.
When does serverless stop being cheap?
At steady high load. Serverless shines for spiky or low traffic where you pay nothing when idle. Once a function runs constantly, a always-on container or VM is usually cheaper per request — cross the two curves before committing.