This topic describes the billing rules and provides a pricing example for Cloud Function.
Billing rules
Cloud Function is billed based on three billable items: resource usage, invocations, and outbound traffic.
Billable item | Description | Billing cycle | Billing formula |
Resource usage | Cloud Function is billed daily based on the total resources consumed by all function instances. To simplify the billing model, Cloud Function converts compute power into memory size (GB). | Daily. Fees are automatically deducted from your account. | Memory (GB) × execution duration (seconds) × unit price |
Invocations | Cloud Function is billed daily based on the total number of invocations. | Daily. Fees are automatically deducted from your account. | Total invocations × unit price |
Outbound traffic | Cloud Function is billed daily based on the total outbound traffic consumed. | Daily. Fees are automatically deducted from your account. | Outbound traffic cost = (Data transfer from function-initiated requests + Data transfer from function responses) × unit price
Note
|
Hourly minimum charge for resource usage
Starting at 00:00:00 on March 16, 2026 (UTC+8), an hourly minimum charge rule applies to Cloud Function resource usage (GB-seconds):
When calculating the daily bill, the system first evaluates resource consumption for each function on an hourly basis.
If a function consumes resources in a given hour (that is, GB-seconds > 0), the resource usage fee for that hour will be at least CNY 0.01.
If the calculated cost is ≥ CNY 0.01, the charge is the actual amount.
If the calculated cost is < CNY 0.01, the charge is CNY 0.01.
Functions that do not run are not billed.
Billing change notice: [Billing Change] EMAS Serverless Cloud Function Billing Rule Update.
Pricing examples
The following example uses pay-as-you-go unit prices to calculate the daily bill.
Example
Memory | Invocations | Execution duration | Outbound traffic | Daily bill |
512 MB | 100,000 | 1 second/invocation | 1 GB | CNY 6.46 |
Formulas:
Note In this example, the resource usage cost is ≥ CNY 0.01, so the minimum charge rule is not triggered. In an actual bill, if the resource usage fee for a given hour is less than CNY 0.01, the minimum charge rule adjusts the fee for that hour to CNY 0.01. | ||||