Pricing for Cloud Functions
What goes into the cost of using Cloud Functions
In Cloud Functions, you're billed for the number of functions invoked, computing resources allocated for the function, and outgoing traffic.
When billing computing resources (GB×hour), the memory allocated for the function and function execution time are taken into account:
- The amount of memory specified when creating a version, in GB.
- The execution time for each function invocation in hours, rounded up to the nearest multiple of 100 ms.
You're charged for all the functions invoked that trigger your code to run.
Example of cost calculation
Example of calculating the cost of a function:
- Memory specified when creating the version: 512 MB.
- Number of functions invoked: 10,000,000.
- Execution time of each call: 800 ms.
Function cost calculation:
0.043846 × (512 / 1024) × (800 / 3600 / 1000) × 10,000,000 + 0.128205 × (10,000,000 / 1,000,000)
- 0.043846 is the GB×hour function execution cost.
- 512 / 1024 converts MB to GB, since execution time is calculated in GB×hour.
- 800 / 3600 / 1000 converts milliseconds to hours, since execution time is calculated in GB×hour.
- 0.128205 is the cost per 1 million function invokes.
- 10,000,000 / 1,000,000 is the number of millions of invokes.
Invoking a function
|Service||Cost of 1 million invokes,
|Invoking a function, <1 000 000 invocations per month||Free|
|Invoking a function, >1 000 000 invocations per month||$0.128205|
You are charged for an actual number of invokes. E.g., the cost of 1000 invokes will be
$0.000128 at the price of
$0.128205 for 1 million invokes.
Function execution time
|Service||Price per 1 GB×hour,
|Functions execution, <1 GB×hour per month||Free|
|Functions execution, >1 GB×hour per month||$0.043846|
When using the service, you pay for the traffic from Yandex.Cloud to the internet. Traffic between Yandex.Cloud services and incoming internet traffic are free.
The minimum charging unit is 1 MB.
|Resource category||Cost of 1 GB, without VAT|
|Outgoing traffic, <10 GB||$0|
|Outgoing traffic, >10 GB||$0.012308|