The unit each model bills in
The claim rests on a unit that is only half right. A function is not billed per call. The pricing page for AWS Lambda, as captured in the reference material, describes two dimensions for event-style functions: the number of requests served and the duration of execution, measured in GB-seconds. Duration is multiplied by the memory you configured, so the same code running for the same time costs more at a large memory setting than at a small one. That multiplication has no counterpart on an instance, where the hourly price does not change with how much of the machine your code happens to use.
Memory also sets CPU. The Lambda developer guide states that CPU is allocated in proportion to memory, that one vCPU is reached at 1,769 MB, and that the configurable range runs from 128 MB to 10,240 MB. The consequence is that raising memory can shorten duration enough to reduce the GB-second total, so cost is not a monotonic function of the setting. A CPU-bound function may be cheaper at a higher allocation. An I/O-bound function, which mostly waits on a database or an HTTP call, may simply pay more for memory it cannot use. The guide itself points to measuring across allocations rather than guessing, which is an admission that the cheapest setting is an empirical question.
An instance is billed differently. The EC2 On-Demand page, as captured here, says pricing is per instance-hour from launch until the instance is stopped or terminated, with partial hours billed per second after a 60-second minimum. The meter runs whether or not a request arrives. So the two models bill different things: the function bills memory occupancy over time, while the instance bills existence. The claim that you pay only while code runs is true of the function's meter. The comparison that matters is occupancy against existence, not a call against a server.
A steady case against a spiky one
Take a service receiving a roughly constant stream of requests. Little's law relates the average number of executions in flight to the arrival rate multiplied by the average duration. Function cost then approximates that average concurrency, multiplied by memory, multiplied by the length of the billing window, plus the per-request charge. Instance cost is the hourly rate multiplied by the hours it runs, and it stays flat until the instance saturates. With steady traffic, the function's meter accumulates continuously in proportion to load while the instance's bill is a horizontal line. The function wins only while the average busy share of an instance-sized slice of memory stays low enough that the accumulating line never passes the flat one.
Now take a spiky workload with the same average. The function's bill barely changes, because it still tracks average concurrency multiplied by memory and time. The instance is different. It has to be sized for the peak, or it fails at the peak, and so it is paid for at peak capacity through the troughs. Marc Brooker's post on multi-tenancy makes the general point that cloud costs follow peak demand while the value a system produces follows average demand. Lambda's pricing sidesteps much of that gap for the customer. The post argues that Lambda absorbs bursts by pooling many uncorrelated workloads on shared hosts, so the function price tracks the customer's average rather than their own peak.
That reverses the usual intuition about which shape suits which model. Spiky traffic with a low average is the function's home ground. Steady traffic with high utilisation is the instance's. Predictability matters for a particular reason: it keeps the function's meter accumulating at a known rate, and a known rate can be set directly against a fixed hourly price. The caveat is that the pooling argument depends on workloads not spiking together. If a customer's own traffic is correlated with its neighbours, or if a given product does not pool the way the post describes, the peak-to-average benefit shrinks and the function's cost begins to look more like the instance's.
What sits outside the function
The function's meter is often the smallest visible item on the bill. Requests served by a function frequently call other services, and each of those calls has its own metering. A function that fans out to several downstream services also runs longer, which feeds back into its GB-seconds. Data transfer adds another layer: egress to the internet and transfer between zones or regions are billed per gigabyte, and on a busy service those lines can exceed the compute itself. An always-on instance pays the same transfer costs, so this is not a point in the instance's favour, but it does mean the function's line item is rarely the one that decides the total.
Logging and monitoring are frequently undercounted. Every invocation can emit log lines that are ingested and stored, and that volume scales with request count rather than with duration. A chatty function with short executions can produce a log bill larger than its compute. An instance logs too, but its volume is tied to what the application does rather than to each call. Database connections are a further hidden cost. A function that opens a connection per invocation adds latency and puts pressure on the database's connection limits. A long-lived instance can hold a pool. In many architectures the database, not the function, is the component that sets the real cost and the real ceiling.
The instance carries costs the function does not. Patching the operating system, maintaining the scaling policy, running health checks and being on call are engineering hours rather than metered dollars, and for a small team they can be the largest term in the comparison. These costs should be counted honestly, but they do not settle the question in favour of serverless. They shift which team does the work. Cold starts add a subtler twist. Keeping a warm pool of execution environments to hide initialisation latency is itself a charge against time rather than traffic, which reintroduces a fixed floor and makes the function start to resemble an instance.
What the crossover depends on
The crossover depends on three things: average concurrency relative to what one instance can serve, the ratio between the instance's hourly cost and the function's per-GB-second and per-request rates at your chosen memory setting, and the peak-to-average ratio of the traffic. Steady, high-utilisation traffic pushes the decision toward the instance. A low average with sharp peaks pushes it toward the function. Duration and memory set the slope of the function's line, while the instance is a step. The crossover is therefore a property of the workload's shape, and two services with the same request volume can land on opposite sides of it.
Free allowances matter at the small end. The Lambda pricing page, as captured in the reference material, lists a monthly free tier of one million requests and 400,000 GB-seconds. A service that stays inside that allowance pays nothing for the compute, which makes the function look decisively cheaper until traffic outgrows it. Above the allowance, the slope applies. The same page describes tiered rates for the duration dimension, which means the marginal price per GB-second can fall at high volume and slightly favour the function at scale. The captured text did not render the tier rates legibly, so any figures should be read from the live page at the time of the decision.
A practical test follows from this. Measure average concurrency, duration and memory from logs over a representative period. Compute the function's cost against the live price sheet, including the requests it fans out to and the logs it generates. Compare that against the instance you would actually run, including its headroom for the peak and the engineering time to operate it. Then revisit the decision when the traffic changes shape, not only when it changes size. The claim that serverless is cheaper fails in three predictable places: when the billing unit is misread as the call, when the peak is ignored in favour of the average, and when the lines around the function outweigh the compute that the comparison was built on.