Cloud Functions pricing
What is included in the Cloud Functions cost
In Cloud Functions, you pay for the number of function calls, computing resources allocated for the function, downtime of provisioned instances, 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 call in hours, rounded up to the nearest multiple of 100 ms.
Warning
You are only charged for the function calls that triggered your code to run.
Pricing formula
Monthly cost = $0.043760 × Memory (GB) × Call processing time (Hours) + $0.12800 × Millions of calls
The following initial amounts are offered free of charge each month:
- 1000000 function invocations.
- 10 GB×hour of function execution.
After you've used up your free service amounts, you will be charged at the applicable rate. The unused balance of free services is reset at the end of the month.
Example of cost calculation
Example of calculating the cost of a function that has:
- Memory specified when creating the version: 512 MB
- Number of function calls: 10,000,000
- Execution time of each call: 800 ms
Function cost calculation:
0.043760 × ((512 / 1,024) × (800 / 3,600 / 1,000) × 10,000,000 – 10) + 0.128000 × ((10,000,000 – 1,000,000) / 1,000,000)
Total: $49.336622
Where:
- 0.043760 is the price for 1 GB×hour.
- 512 / 1,024 converts MB to GB, as execution time is calculated in GB×hour.
- 800 / 3,600 / 1,000 converts milliseconds to hours, as execution time is calculated in GB×hour.
- 10,000,000 is the number of function calls.
- 10 is subtracted because the first 10 GB×hour are free.
- 0.128000 is the price per 1 million function calls.
- 10,000,000 is the number of function calls.
- 1,000,000 is subtracted because the first million invocations are free of charge.
- 1,000,000 is the divisor used to calculate the number of millions of function calls.
Using triggers
Triggers can be used free of charge. You can create and use triggers within the available quotas and limits.
Alice skills
Cloud Functions functions used for Alice skills are not billable and do not consume your free amount of services, if:
- The function is invoked by the Yandex Dialogs platform
. - The Alice's skill was created by the instructions
.
However, if the function uses other Yandex Cloud resources, they are billed. For example, if the function makes requests to the Message Queue queue, the requests are billed according to the pricing.
Pricing
Invoking a function
Service | Cost per 1 million calls, without VAT |
---|---|
Function calls, 1 million or less calls per month | Free |
Function calls, over 1 million invocations per month | $0.128000 |
You pay for the actual number of invocations. For example, given that 1,000,000 calls cost $0.128000, 1,000 calls in excess of the free amount will cost $0.000128.
Function execution time
Service | Price per 1 GB×hour, without VAT |
---|---|
Functions execution, 1 GB×hour or less per month | Free |
Functions execution, over 1 GB×hour per month | $0.043760 |
Provisioned instances
Service | Cost per 1 GB×hour, without VAT |
---|---|
Downtime of a provisioned instance | $0.015385 |
Execution time of a function in a provisioned instance | $0.029488 |
Egress traffic
When using the service, you pay for traffic from Yandex Cloud to the internet. Traffic between Yandex Cloud services and incoming internet traffic are free of charge.
The first 100 GB of outgoing traffic are provided free of charge every month.
The minimum billing unit is 1 MB.
Resource category | Cost of 1 GB |
---|---|
Outgoing traffic via NAT gateway, first 10 GB per month | Free |
Outgoing traffic via NAT gateway, over 10 GB per month | $0.012240 |