The pay-as-you-go billing method allows you to pay only for the resources that you use. If you use the pay-as-you-go billing method, you pay only for the Function Compute resources that you use. You do not need to purchase resources in advance. This topic describes the resources that support the pay-as-you-go billing method and the billing rules of the pay-as-you-go billing method.

Applicable resources

All billable items in Function Compute support the pay-as-you-go billing method:
  • Number of requests
  • Resource usage
    • Resource usage of active instances
    • Resource usage of idle instances
  • Outbound Internet traffic
    • Data transfer within a function
    • Function response traffic
    • CDN back-to-origin traffic

For more information, see Overview.

Billing rules

Billing granularity

The following table describes the billing granularities of different types of instances based on the execution duration of the instances.
Instance type On-demand mode Provisioned mode
Elastic instances The billing granularity is 1 millisecond. The billing granularity is 1 second. If the execution duration is less than 10 seconds, it is billed as 10 seconds.
Note For example, if the execution duration of a provisioned instance is 51 seconds, you are charged for 60 seconds. If the execution duration is 61 seconds, you are charged for 70 seconds.
Performance instances
GPU-accelerated instances The billing granularity is 1 second. If the execution duration is less than 1 second, it is billed as 1 second.
Note For example, if the execution duration of an on-demand GPU-accelerated instance is 51 milliseconds, you are charged for 1 second. If the execution duration is 10.5 seconds, you are charged for 11 seconds.
Note Execution duration refers to the execution period of the function.

Billing cycle

The billing cycle is 1 hour. Fees are automatically deducted from your Alibaba Cloud account balance.