All Products
Search
Document Center

Serverless App Engine:Pay-as-you-go

Last Updated:Nov 11, 2024

Pay-as-you-go is a billing method that allows you to use resources before you pay for them. If you use the pay-as-you-go billing method, you are charged only for the Serverless App Engine (SAE) resources that are used. You do not need to purchase resources in advance. This topic describes the billable items of SAE and provides billing examples.

Usage notes

You are charged based on your resource usage. Bills are generated and fees are deducted from the balance of your Alibaba Cloud account at the end of each billing cycle. You are charged on a minutely basis. If the usage duration in a billing cycle is less than 1 minute, the usage duration is rounded up to 1 minute.

Billing cycle

Pay-as-you-go SAE resources are billed for each hour on the hour (UTC+8). After fees for the resources are settled, a new billing cycle starts.

When you query bills, the bills may not be immediately generated. In most cases, you can query the bill for a billing cycle 3 hours after the billing cycle starts. For example, you can view the bill for the billing cycle from 01:00 to 02:00 at 04:00.

Billable items and pricing

Important

The actual prices that are provided by your account manager take precedence.

Region

Billable item

Listed price

Billing granularity

  • China (Beijing)

  • China (Shanghai)

vCPU

0.0004115 USD per core-minute

Minute

Memory

0.0001029 USD per GiB-minute

  • China (Hong Kong)

  • Japan (Tokyo)

vCPU

0.0007055 USD per core-minute

Memory

0.0001764 USD per GiB-minute

  • Singapore

  • Indonesia (Jakarta)

  • Germany (Frankfurt)

vCPU

0.0006414 USD per core-minute

Memory

0.0001603 USD per GiB-minute

Billing formulas and examples

Billing formulas

Fees are generated for SAE based on two billable items. The fee for each billable item is settled based on the statistical results and calculation method. Bills are generated and fees are deducted on an hourly basis. The resources that are used by each application are calculated based on the following formulas:

  • vCPU usage of an application = ∑vCPU specification of each instance in the application × Running duration in minutes

  • Memory usage of an application = ∑Memory specification of each instance in the application × Running duration in minutes

The statistics are accurate to seconds. If the usage duration in a billing cycle is less than 1 minute, the usage duration is rounded up to 1 minute.

Billing examples

This section provides examples on how to calculate the fees for an application that resides in the Singapore region. The following list describes the basic information about the application:

  • Creation time: 2023-12-01 10:00

  • Number of created instances: 3

  • Instance type: 1-core CPU, 2-GiB memory

Change operation 1:

  • Change time: 2023-12-01 10:10

  • Change operation: scale-in (The number of instances is decreased from 3 to 1.)

  • Number of available instances: 1

Change operation 2:

  • Change time: 2023-12-01 10:30

  • Change operation: scale-out (The number of instances is increased from 1 to 2.)

  • Number of available instances: 2

Current time: 2023-12-01 10:40

The vCPU and memory usage of the application are calculated by using the following formulas:

  • vCPU usage = 3 × 1 core × (10:10 - 10:00) + 1 × 1 core × (10:30 - 10:10) + 2 × 1 core × (10:40 - 10:30) = 70 core-minutes

  • Memory usage = 3 × 2 GiB × (10:10 - 10:00) + 1 × 2 GiB × (10:30 - 10:10) + 2 × 2 GiB × (10:40 - 10:30) = 140 GiB-minutes

The fees that are generated for the billable items of the application are calculated by using the following formulas:

  • vCPU usage fee = 70 core-minutes × USD 0.0006414 per core-minute = USD 0.04

  • Memory usage fee = 140 GiB-minutes × USD 0.0001603 per GiB-minute = USD 0.02

  • Total fees = vCPU usage fee + Memory usage fee = USD 0.04 + USD 0.02 = USD 0.06