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 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, including the following items:
  • Number of requests
  • Resource usage
  • Data transfer to Internet

For more information, see Billing.

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 1 minute, it is billed as 1 minute.
    Note For example, if the execution duration of functions by a provisioned instance is 51 seconds, you are charged for 1 minute. If the execution duration is 61 seconds, you are charged for 61 seconds.
    Performance instances The billing granularity is 1 millisecond. If the execution duration is less than 1 minute, it is billed as 1 minute.
    Note For example, if the execution duration of functions by an on-demand performance instance is 51 milliseconds, you are charged for 1 minute. If the execution duration is 60,001 milliseconds, you are charged for 60,001 milliseconds.
    Note Execution duration refers to the execution period of the function.
  • Billing cycle: Resources are billed by hour. Fees are automatically deducted from your Alibaba Cloud account balance.