Billing overview

更新时间:
复制 MD 格式

Function Compute bills all resource consumption — function invocations, vCPU time, memory, disk, and GPU usage — as compute units (CUs). Each resource type converts to CUs through a fixed factor, and you pay based on total monthly CU consumption.

Function Compute supports three billing methods:

  • Trial quotas -- A complimentary CU allowance for first-time users.

  • Pay-as-you-go -- Pay only for the computing resources you consume.

  • Resource plans -- Pre-purchase CU bundles at a discounted rate.

View your resource consumption on the Overview > Global Statistics page in the Function Compute console. Use the price calculator to estimate your total CU cost.

Note
  • The resource usage of all Resource Access Management (RAM) users is aggregated and billed to your Alibaba Cloud account.

  • Since January 5, 2024, Cloud Data Transfer (CDT) handles outbound Internet traffic billing for Function Compute. Billing follows Services and metering methods supported by CDT. [Product changes] Change of free Internet traffic quota.

  • Starting August 27, 2024, individual resource items are no longer billed directly. All usage is converted into CU usage through conversion factors and charged at CU unit prices.

  • Resources consumed from other Alibaba Cloud services are billed separately.

CU pricing and conversion

CU tiered pricing

CU usage is billed monthly on a tiered basis. Higher consumption tiers have lower unit prices.

Tier Monthly CU usage Unit price Discounted unit price (Aug 27, 2024 - Aug 27, 2025)
1 0 - 100 million USD 0.000020/CU USD 0.0000160/CU
2 100 million - 500 million USD 0.000017/CU USD 0.0000136/CU
3 Over 500 million USD 0.000014/CU USD 0.0000112/CU

CU conversion factors

All resource usage is converted to CU usage using the formula:

CU usage = Resource usage x Conversion factor

Conversion factors by billable item:

Billable item Unit Conversion factor
Number of function invocations CU / 10,000 invocations 75
Active vCPU usage CU / vCPU-second 1
Idle vCPU usage CU / vCPU-second 0
Memory usage CU / GB-second 0.15
Disk usage CU / GB-second 0.05
Tesla series - Active GPU usage CU / GB-second 2.1
Tesla series - Idle GPU usage CU / GB-second 0.5
Ada series - Active GPU usage CU / GB-second 1.5
Ada series - Idle GPU usage CU / GB-second 0.25
Note
  • The first 512 MB of disk size is free. You are only charged for disk capacity exceeding 512 MB.

  • Idle vCPU usage has a conversion factor of 0, which means idle vCPUs do not incur charges.

Billing methods

Trial quotas

Function Compute offers a complimentary CU allowance for first-time users. Usage exceeding the trial quota is billed pay-as-you-go. Trial quotas.

Pay-as-you-go

You pay only for the resources you consume, with no upfront commitment. Pay-as-you-go.

Resource plans

Function Compute offers five tiers of CU resource plans at discounted rates. Purchased plans offset your usage first; any excess is billed pay-as-you-go. Resource plans.

Key billing concepts

How resource usage is calculated

Important

vCPU, memory, disk, and GPU usage are calculated based on your configured function specifications and usage duration — not actual resources consumed during execution.

Active and idle instances

With idle mode enabled, instances are classified as active or idle based on whether they are processing requests:

  • Active instances: Instances that are currently processing requests.

  • Idle instances: Instances that are not processing requests.

Active and idle instances are billed at different rates, as shown in the CU conversion factors table.

On-demand and provisioned modes

Function Compute instances run in either on-demand or provisioned mode, which differ in how execution duration is measured. Instance types and usage modes.

  • On-demand mode: Function Compute automatically allocates and releases instances. Billing starts when an instance begins executing a request and ends when the request completes.

  • Provisioned mode: You allocate, release, and manage function instances yourself. Billing starts when Function Compute allocates the instance and ends when you release it.

Important

In provisioned mode, you are charged for instances regardless of request activity. Release unneeded provisioned instances promptly to avoid unnecessary charges. Configure auto scaling rules.

Billing examples

General billing example

Assume your monthly resource consumption is as follows:

Resource type Usage
Active vCPU usage 800,000,000 vCPU-seconds
Memory usage 2,000,000,000 GB-seconds
Disk usage 0 GB-seconds
Tesla series - Active GPU usage 100,000,000 GB-seconds
Tesla series - Idle GPU usage 400,000,000 GB-seconds
Number of function invocations 12,000,000,000 invocations

Step 1: Convert resource usage to CU usage

Resource type Total usage Conversion factor CU usage
Active vCPU usage 800,000,000 vCPU-seconds 1 CU/vCPU-second 800,000,000 CU
Memory usage 2,000,000,000 GB-seconds 0.15 CU/GB-second 300,000,000 CU
Disk usage 0 GB-seconds 0.05 CU/GB-second 0 CU
Tesla series - Active GPU usage 100,000,000 GB-seconds 2.1 CU/GB-second 210,000,000 CU
Tesla series - Idle GPU usage 400,000,000 GB-seconds 0.5 CU/GB-second 200,000,000 CU
Number of function invocations 12,000,000,000 invocations 0.0075 CU/invocation 90,000,000 CU
Total CU usage 1,600,000,000 CU
Note

The first 512 MB of disk size is free. You are charged for disk capacity exceeding 512 MB.

Step 2: Apply tiered pricing

Tier CU range CU usage in tier Unit price Cost
1 0 - 100 million 100,000,000 CU USD 0.000020/CU USD 2,000
2 100 million - 500 million 400,000,000 CU USD 0.000017/CU USD 6,800
3 Over 500 million 1,100,000,000 CU USD 0.000014/CU USD 15,400
Total 1,600,000,000 CU USD 24,200

Provisioned CPU instances

In this scenario, you create a function with the following specifications:

  • vCPUs: 0.35

  • Memory: 512 MB

  • Disk: 512 MB

The instances are provisioned for 50 hours (10 active, 40 idle) with 1,000,000 total invocations.

Note

For provisioned CPU instances, memory and disk are billed for the total provisioned duration. Active vCPU usage is billed for active duration only.

Step 1: Convert resource usage to CU usage

Resource type Usage Conversion factor CU usage
Active vCPU usage 12,600 vCPU-seconds 1 CU/vCPU-second 12,600 CU
Idle vCPU usage 50,400 vCPU-seconds 0 CU/vCPU-second 0 CU
Memory usage 90,000 GB-seconds 0.15 CU/GB-second 13,500 CU
Disk usage 0 GB-seconds 0.05 CU/GB-second 0 CU
Number of function invocations 1,000,000 invocations 0.0075 CU/invocation 7,500 CU
Total CU usage 33,600 CU
Note
  • No fees are incurred for idle vCPUs (conversion factor is 0).

  • The first 512 MB of disk is free. You are charged for disk capacity exceeding 512 MB.

Step 2: Apply tiered pricing

All 33,600 CUs fall within Tier 1 (0 - 100 million CU).

Fee = USD 0.000020/CU x 33,600 CU = USD 0.67

Provisioned GPU-accelerated instances

In this scenario, you create a GPU function with the following specifications:

  • GPU memory: 16 GB (Tesla series)

  • vCPUs: 8

  • Memory: 32 GB

  • Disk: 512 MB

The instances are provisioned for 50 hours (10 active, 40 idle) with 1,000,000 total invocations.

Note

For provisioned GPU-accelerated instances, memory and disk are billed for the total provisioned duration. Active vCPU and GPU usage are billed for active duration only. vCPUs and GPUs freeze when no requests are being processed.

Step 1: Convert resource usage to CU usage

Resource type Usage Conversion factor CU usage
Active vCPU usage 288,000 vCPU-seconds 1 CU/vCPU-second 288,000 CU
Idle vCPU usage 1,152,000 vCPU-seconds 0 CU/vCPU-second 0 CU
Memory usage 5,760,000 GB-seconds 0.15 CU/GB-second 864,000 CU
Disk usage 0 GB-seconds 0.05 CU/GB-second 0 CU
Tesla series - Active GPU usage 576,000 GB-seconds 2.1 CU/GB-second 1,209,600 CU
Tesla series - Idle GPU usage 2,304,000 GB-seconds 0.5 CU/GB-second 1,152,000 CU
Number of function invocations 1,000,000 invocations 0.0075 CU/invocation 7,500 CU
Total CU usage 3,521,100 CU
Note
  • No fees are incurred for idle vCPUs (conversion factor is 0).

  • The first 512 MB of disk is free. You are charged for disk capacity exceeding 512 MB.

Step 2: Apply tiered pricing

All 3,521,100 CUs fall within Tier 1 (0 - 100 million CU).

Fee = USD 0.000020/CU x 3,521,100 CU = USD 70.42

FAQ