Serverless pricing at AWS, Azure and Google Cloud is per invocation and per unit of run time: the providers bill requests per million and execution time in GB-seconds, memory multiplied by duration (vCPU and memory separately on Cloud Run and Lambda Web Functions), and nothing between requests unless capacity is kept ready. That holds for Lambda Event Functions, Azure's Consumption plans and Cloud Run's request-based billing; Lambda Web Functions bill a running environment's memory between requests too, and MicroVMs, Managed Instances, Azure Premium and Cloud Run's instance-based billing bill the instance's run time. Cost therefore follows traffic and call duration, not the number of servers; capacity kept ready, logs, gateways and data transfer are separate lines, some under other services.
How it works
The units
A GB-second is one gigabyte of memory for one second. Lambda allocates CPU in proportion to memory, configurable from 128 MB to 10,240 MB, and 1,769 MB equals one vCPU. A price per GB-second therefore includes CPU and compares only with a price including the same CPU. Cloud Run, Lambda Web Functions and Lambda MicroVMs bill vCPU and memory separately. Rounding differs too: Lambda Event Functions and Web Functions meter to the millisecond, Lambda MicroVMs per second, the Azure Consumption plan with a 100 ms and 128 MB minimum, Flex Consumption with a 1,000 ms minimum and 100 ms steps after it, Cloud Run in 100 ms steps.
AWS
On the read date the AWS Lambda pricing page is split into Event Functions (listing Durable Functions and Managed Instances), MicroVMs and Web Functions, all with pricing dimensions of their own:
| Type | Billed units |
|---|---|
| Event Functions | requests, duration in GB-seconds on an x86 or Arm price list, ephemeral storage above 512 MB, tenant isolation per new execution environment |
| Durable Functions | Event Functions compute, plus durable operations, data written per GB and data retained per GB-month |
| Managed Instances | requests, the EC2 instance price and a 15 percent management fee on its on-demand price, no duration charge |
| Web Functions | requests, active CPU time per vCPU-second, memory per GB-second for as long as the environment runs |
| MicroVMs | vCPU and memory per second (baseline and peak), snapshot reads and writes per GB, snapshot storage per GB-month |
Event Functions duration tiers apply per architecture and region across the account or organisation. Provisioned Concurrency is billed per configured concurrency and memory from enabling to disabling, rounded up to five minutes, plus requests and a duration rate of its own; the free tier excludes it. SnapStart bills snapshot caching (three hours minimum) and each restore, except on supported Java managed runtimes.
Azure
Microsoft recommends Flex Consumption as its serverless plan. It runs on Linux only, with instance sizes of 512, 2,048 or 4,096 MB, and bills each instance in one of two modes. On Demand bills memory while an instance executes functions, plus executions, with 100,000 GB-seconds and 250,000 executions free per subscription and month. Always Ready bills a baseline in GB-seconds while each ready instance sits idle, execution time while it runs functions, and executions, with no free grant.
On the read date the Consumption plan is legacy: the hosting options table lists it as GA on Windows and Retired on Linux, with the Linux option ending on 2028-09-30. It bills executions and observed memory (rounded up to 128 MB, at most 1,536 MB) multiplied by duration, with 1 million executions and 400,000 GB-seconds free. Premium bills vCPU and memory of all allocated instances per second with no execution charge, and at least one instance always runs; Dedicated pays the App Service plan rate. Each function app's storage account costs extra.
Google Cloud
Cloud Run functions are Cloud Run services and billed as such; the former Cloud Functions pricing page redirects to Cloud Run pricing. The page excludes Cloud Run functions (1st gen). Request-based billing charges vCPU-seconds and GiB-seconds only while an instance starts, shuts down or handles at least one request, plus requests per million; minimum instances cost an idle rate in between. Instance-based billing charges each instance's whole lifetime, one minute minimum. Prices follow the region's price tier. The free tier applies per billing account across projects, as a spending-based discount at Tier 1 prices, so in Frankfurt (Tier 2) it covers fewer seconds. Cloud Build, Artifact Registry and Eventarc are billed separately.
What it means for your cost
| Billed units | Cost without requests | Monthly free allowance | |
|---|---|---|---|
| Lambda Event Functions | requests, GB-seconds | Provisioned Concurrency while configured | 1 million requests, 400,000 GB-seconds |
| Azure Flex Consumption | executions, GB-seconds | Always Ready baseline | 250,000 executions, 100,000 GB-seconds per subscription, On Demand only |
| Azure Premium | vCPU and memory per second | at least one instance | none |
| Cloud Run, request-based | requests, vCPU-seconds, GiB-seconds | minimum instances at the idle rate | 2 million requests, 180,000 vCPU-seconds, 360,000 GiB-seconds per billing account |
In billing data, requests and duration are separate line items, and capacity kept ready is another. An endpoint's other costs sit under other services: invocation logs in the logging service (observability), an API gateway, data transfer (data transfer and egress), the storage account on Azure, Artifact Registry on Google. Cost per request as unit economics needs all these lines (unit economics and unit costs).
Free allowances apply per account, subscription or billing account, never per function (free tiers and introductory credits). The mechanism leaves three decisions: memory, which on Lambda also sets CPU and therefore duration; capacity kept ready against cold starts, a fixed cost per hour; and the steady volume at which instances or containers cost less than a price per call. On-demand pricing covers how these undiscounted prices arise.
Where it goes wrong
- Provisioned Concurrency around the clock. Symptom: a Lambda line stays flat day and night whatever the traffic. Cause: it bills from enabling to disabling, rounded up to five minutes, and the free tier excludes it.
- Instances kept ready and forgotten. Symptom: an Always Ready baseline or a Cloud Run idle line with no requests. Cause: Always Ready and minimum instances bill while idle.
- The legacy plan's allowance assumed. Symptom: a Flex Consumption estimate is too low. Cause: Flex grants 250,000 executions and 100,000 GB-seconds in On Demand mode only, the Consumption plan 1 million and 400,000.
- Memory cut without looking at duration. Symptom: GB-seconds rise instead of falling. Cause: on Lambda, less memory means less CPU and longer duration, and the bill is their product.
- Side costs under other services. Symptom: the function is cheap, the endpoint is not. Cause: logs, API gateway, data transfer and the storage account are billed under their own services.
Example
List prices read on 2026-10-16: AWS Lambda Event Functions in US East (N. Virginia) USD 0.20 per million requests and USD 0.0000166667 per GB-second on x86, USD 0.0000133334 on Arm; Lambda Web Functions there on Arm USD 0.30 per million requests, USD 0.0000276944 per active vCPU-second and USD 0.0000036667 per GB-second (figures from the pricing page's worked examples); Azure Functions Flex Consumption in Germany West Central, On Demand EUR 0.000033 per GB-second and EUR 0.352 per million executions, Always Ready baseline EUR 0.0000044 per GB-second (converted by Microsoft from USD); Cloud Run request-based in Frankfurt (europe-west3) USD 0.0000336 per active vCPU-second, USD 0.0000035 per GiB-second and USD 0.40 per million requests.
Sources
Read on 2026-10-16. AWS Lambda pricing, Configure Lambda Event Function memory, Azure Functions pricing, Azure Functions scale and hosting, Azure Functions Flex Consumption plan hosting, Cloud Run pricing.