Runtime

What is per-second billing?

Per-second billing charges for cloud resources by the second they run, instead of rounding every start up to a whole hour or minute.

Runtime bills compute with no one-minute minimum, and bills CPU by the work it measures: $0.025 per active vCPU-hour, which is a CPU-second at a 3,600th of that. Memory is billed while the sandbox runs, at $0.0075 per GiB-hour, and a pause stops compute billing at once (pricing).

A short history

Clouds billed virtual machines by the hour until 2 October 2017, when Amazon announced that EC2 Linux instances "will be billed on one second increments, with a minimum of 60 seconds". Other clouds followed. Functions went further: AWS Lambda bills duration by the millisecond.

What the unit hides

The unit is only half the bill. The other half is what is counted in each second:

Billing A one-minute run, 2 vCPUs, busy for 10 seconds
Per hour, allocated vCPUs A full hour of 2 vCPUs
Per second, 60-second minimum 60 seconds of 2 vCPUs
Per second, allocated vCPUs 60 seconds of 2 vCPUs
Per second, measured CPU 20 CPU-seconds, plus memory for 60 seconds

Rounding matters for short runs too. A provider that rounds each run up to the minute bills a ten-second check as sixty; CodeSandbox does, and on 40-second runs that makes the example job $2.48 there against $0.47 on Runtime (CodeSandbox vs AWS Lambda MicroVMs).

Worked on Runtime

1,000 runs of a 2 vCPU, 4 GiB sandbox, 60 seconds each, with 20 CPU-seconds of work per run:

textCPU:     1,000 × 20 s / 3,600 × $0.025      = $0.14Memory:  1,000 × 60 s / 3,600 × 4 GiB × $0.0075 = $0.50Total:                                          $0.64

Sources

Checked 27 September 2026.