All Products
Search
Document Center

Elastic Compute Service:Pay-as-you-go

Last Updated:Jun 24, 2026

Pay-as-you-go is a postpaid billing method where you are charged based on how long you retain resources or your actual traffic consumption. Compared to the subscription billing method, this model offers greater flexibility. You can release resources at any time to stop incurring charges, reducing costs from idle resources.

Use cases

  • Your business experiences fluctuations or rapid growth, leading to temporary and unpredictable resource needs.

  • You need to create and release resources on demand.

Common scenarios include temporary scaling, testing, and e-commerce flash sales.

Billing rules

Pay-as-you-go resources are billed based on two models:

  • Pay-by-duration: You are charged based on how long you retain resources. This applies to resources such as instance types and disks.

  • Pay-by-usage: You are charged based on your actual resource usage. This applies to public bandwidth that uses the pay-by-traffic billing method.

When you purchase a pay-as-you-go ECS instance, you select an instance type and configure a system disk. You might also configure a paid image, a data disk, and public bandwidth that is billed on a pay-by-traffic basis. On the purchase page, you can view a cost breakdown similar to the following list:

This scenario is for illustrative purposes only. The actual billable items and prices are subject to the information displayed on the purchase page. If your configuration differs from this example, consult the billing rules in the tables below.
  • Instance: The fee for the selected instance type. This includes fees for compute resources (vCPUs, memory, and GPUs), local disks (storage devices that cannot be detached from the instance), and components for enhanced instance families.

  • System disk: The fee for the system disk capacity.

  • Data disk: The fee for the data disk capacity.

  • Image fee: The image license fee, based on the market price of the paid image.

  • Data transfer fee: The fee for public bandwidth (pay-by-traffic).

In addition to the items in this example, a pay-as-you-go instance may incur other fees based on its configuration. The following tables describe the billing rules for pay-as-you-go billable items.

Pay-by-duration

Billable item

Billing formula

Billing duration

Instance type

Instance type fee = Instance type unit price × Billing duration

The price of the same instance type may vary by region. For details, see the Elastic Compute Service Pricing page.

Measured in seconds. Billing starts when the instance is created and ends when the instance is released.

You are charged for the instance type until the instance is released, even if no applications are running on it.

Disk (system disk/data disk)

Disk capacity fee = Disk unit price × Disk capacity × Billing duration

Disk capacity is the capacity that you specify at the time of purchase. Disk prices may vary by region. For details, see the Elastic Compute Service Pricing page.

ESSD AutoPL disks incur additional fees if you configure provisioned performance or enable performance bursting. For more information, see Elastic Block Storage billing.

Measured in seconds. Billing starts when the instance is created and ends when the instance is released.

Image

Image OS license fee = Image unit price × Billing duration

For the prices of public images, see Image billing.

Measured in seconds. Billing starts when an instance using a paid image is created and ends when the instance is released or its operating system is replaced.

Public bandwidth (pay-by-bandwidth)

Public bandwidth fee (pay-by-bandwidth) = Bandwidth unit price × Bandwidth size × Billing duration

For public bandwidth prices for different regions, see the Bandwidth Price tab on the Elastic Compute Service Pricing page.

Measured in seconds. Billing starts when the instance is created and ends when the instance is released or the public bandwidth is disabled (the bandwidth value is set to 0).

If you replace the image of an instance, billing for the old image stops and billing for the new image starts.

Snapshot

Snapshot storage fee = Snapshot unit price × Snapshot size × Billing duration

Alibaba Cloud calculates snapshot fees separately for each region based on the type and size of snapshots that you use. For more information, see the Snapshot Service Price tab on the ECS Pricing Details page.

Measured by the hour. Billing starts when the snapshot is created and ends when the snapshot is deleted.

Minimum billing duration

For pay-as-you-go resources, Alibaba Cloud generates a consumption record for each one-hour interval, such as from 00:00:00 to 01:00:00 on January 1, 2025. Each one-hour interval is a billing cycle. If a resource is released within a billing cycle and its actual usage duration for instance type, disk capacity, public bandwidth (pay-by-bandwidth), or snapshot is shorter than the minimum billing duration, the resource is billed for the minimum billing duration in that cycle.

  • Minimum billing duration for an instance type, disk capacity, and public bandwidth (pay-by-bandwidth):

    • 1 vCPU instance: Billed for 10 minutes if used for less than 10 minutes.

    • 2 vCPU instance: Billed for 5 minutes if used for less than 5 minutes.

    • 4 vCPU or larger instances: Billed for 2 minutes if used for less than 2 minutes.

  • Minimum billing duration for snapshots: Billed for a minimum of one hour if used for less than one hour.

For a calculation example, see How is the minimum billing duration calculated?

Pay-by-usage

Billable item

Billing formula

Unit price

Traffic measurement

Public bandwidth (pay-by-traffic)

Public bandwidth fee (pay-by-traffic) = Outbound data transfer unit price × Data transfer

Linear pricing. Public bandwidth prices vary by region. For more information, see the Bandwidth Price tab on the Elastic Compute Service Pricing page.

Measured in bytes. The actual data transfer is converted to GB and rounded down to six decimal places.

Bill generation and overdue payments

Billing and settlement process

Alibaba Cloud records your resource usage in real time. You can view hourly consumption details on the Bill Details page. After the monthly bill is generated, you can review the usage and price details to verify the cost calculation.

Detailed bill data may be updated with a delay. For usage instructions and field descriptions, see View your billing details.

Pay-as-you-go ECS resources are settled together with other postpaid products in your account. Resources are billed per second, and consumption details are generated hourly. A settlement occurs each time your accumulated consumption reaches the deduction threshold.

  • If your default payment method is a bank card, the deduction threshold is 1,000 USD.

  • If your default payment method is PayPal or Paytm (India), the deduction threshold varies based on your ECS usage.

The system attempts to deduct fees on three dates: the due date (T), T+7, and T+14. If the payment on the due date (T) fails, the payment for the instance becomes overdue. The system then makes two more attempts on day T+7 and day T+14. If all three attempts fail, the instance is stopped on day T+15, and billing for the instance also stops. For more information, see Overdue payments for pay-as-you-go resources.

Additionally, a final settlement occurs on the first day of the following month to deduct any fees that have accumulated but have not reached the deduction threshold.

Overdue payments

An overdue payment occurs if your available credit (including your account balance and coupons) is insufficient to cover the bill. After a payment becomes overdue, you cannot create new pay-as-you-go resources, and your existing instances are at risk of being stopped and released. The system sends you reminders and notifications. Settle the overdue bill promptly to avoid any disruption to your services.

For information about resource status changes after a payment becomes overdue, see Overdue payments.

Optimize costs

Release idle resources promptly

Pay-as-you-go ECS instances continue to incur charges after being manually stopped unless economical mode is enabled. If you no longer need an instance, you can release it. After a pay-as-you-go instance is released, it no longer incurs fees. For information about how to release an instance, see Release an instance.

Important

Data on a released instance is permanently deleted and cannot be recovered. If you need to retain the data, create a snapshot to back it up before you release the instance. For more information, see Create a manual snapshot.

Enable economical mode

The following table describes the billing status of various resources when an instance is Running, Stopped (Standard), or in economical mode. If you do not need to use an instance temporarily, you can enable economical mode to save on resource costs while retaining the instance data. After you enable economical mode for an instance, billing is paused for its instance type, pay-by-bandwidth public bandwidth, and image license. However, other resources, such as disks and Elastic IP Addresses (EIPs), continue to be billed.

Billable item

Running

Stopped (standard)

Economical mode

Instance type

Billed

Billed

Not billed

Disk capacity (system and data disks)

Billed

Billed

Billed

Public bandwidth (pay-by-bandwidth)

Billed

Billed

Not billed

Public bandwidth (pay-by-traffic)

Billed

Billed based on actual data transfer

Not billed

No data transfer is generated and no fees are incurred

Not billed

No data transfer is generated and no fees are incurred

Image license

Billed

Billed

Not billed

Important

Using economical mode may introduce risks when you restart the instance, such as startup failure, public IP address changes, and clearing of CPU credits for burstable performance instances. For more information about the risks, see Risks of economical mode.

Use commitment-based discounts

  • Savings Plans: You commit to a specific amount of spending over a period to receive discounts on pay-as-you-go resources. This option is ideal for stable workloads. For more information, see What are Savings Plans?.

  • Reserved Instance (RI): You reserve compute capacity in a specific region and for a specific instance type to receive a discount. This option is ideal for workloads with fixed instance types and regions. For more information, see What is a Reserved Instance (RI)?.

Change the billing method

Set up cost monitoring and alerts

You can set up spending alerts for your pay-as-you-go ECS instances to prevent budget overruns from unexpected high usage. To do this, perform the following steps:

  1. In Message Center, set the recipients for Account Financial Messages.

  2. Log on to the User Center and choose Billing Management > Billing Overview.

  3. On the Billing Overview page, click Configure Daily Bill Alert in the upper-right corner.

  4. On the settings page, select a Product for Alert, enter a Threshold, and then click Add to create the alert.

For more information, see Set a high-spending alert.

FAQ

How is the minimum billing duration calculated?

For the pay-as-you-go billing method, Alibaba Cloud generates a consumption record for each one-hour interval, such as from 00:00:00 to 01:00:00 on January 1, 2025. Each one-hour interval is a billing cycle. If an instance is released within a billing cycle and its actual usage duration is shorter than the minimum billing duration, the instance is billed for the minimum billing duration in that cycle.

The following example assumes the instance is configured only with a disk and pay-by-bandwidth public bandwidth. The instance configuration was not changed before the instance was released.

Scenario

Creation and release time

Billing duration

Instance created and released in the same billing cycle

Created: 00:01:00, January 1, 2025

Released: 00:02:00, January 1, 2025

Because the usage duration is less than the minimum, the instance is billed for the minimum duration. The billing duration is as follows:

  • 1 vCPU instance: 10 minutes

  • 2 vCPU instance: 5 minutes

  • 4 vCPU or larger instances: 2 minutes

Instance created and released across billing cycles

Created: 00:59:00, January 1, 2025

Released: 02:00:20, January 1, 2025

  • For the billing cycles from when the instance was created until the cycle before it was released, the instance is billed for its actual usage duration. For the billing cycles from 00:00:00 to 02:00:00 on January 1, 2025, the billing duration is as follows:

    • 1 vCPU instance: 1 hour and 1 minute

    • 2 vCPU instance: 1 hour and 1 minute

    • 4 vCPU or larger instances: 1 hour and 1 minute

  • In the billing cycle when the instance was released, its actual usage duration is shorter than the minimum billing duration. Therefore, it is billed for the minimum billing duration. For the billing cycle from 02:00:00 to 03:00:00 on January 1, 2025, the billing duration is as follows:

    • 1 vCPU instance: 10 minutes

    • 2 vCPU instance: 5 minutes

    • 4 vCPU or larger instances: 2 minutes

Billing for stopped instances

An ECS instance can be in two stopped states. An instance that is stopped due to an overdue payment does not incur fees. Whether you are charged for a manually stopped instance depends on the instance configuration and network type, as described below:

  • Stopped due to an overdue payment: An instance enters this state when it is automatically stopped because of an overdue payment on your account. An instance in this state is not billed. An instance does not remain in this state indefinitely. For information about resource status changes, see Overdue payments.

  • Manually stopped: An instance enters this state when you stop it from the ECS console or by calling the StopInstance API, changing its status to Stopped. Billing for a manually stopped instance depends on its network type and whether economical mode is enabled.

    • Economical mode is enabled: When the instance is in the Stopped state, billing is paused for its compute resources (vCPUs, GPUs, and memory), OS license, and fixed public IP address. However, billing continues for other resources, such as disks and EIPs. Billing for the paused resources resumes after the instance is started. For more information, see Economical mode.

    • Economical mode is not enabled: If economical mode is not enabled, the instance continues to be billed as usual when stopped.