All Products
Search
Document Center

ApsaraDB RDS:Change the billing method from pay-as-you-go to serverless

Last Updated:Mar 28, 2026

Switch an ApsaraDB RDS for MySQL instance from pay-as-you-go to serverless to enable auto scaling of computing resources based on actual workloads. This is useful when workloads fluctuate significantly or during periods of low utilization.

For an overview of serverless RDS instances and their use cases, see Overview of serverless ApsaraDB RDS for MySQL instances.

Prerequisites

Before you begin, ensure that the instance meets all of the following requirements:

  • Runs MySQL

  • Runs RDS Basic Edition or RDS High-availability Edition

  • Uses the standard product type

  • Uses a PL1 ESSD or premium performance disk

  • Runs one of the following minor engine versions or later, and the version is not phased out. For more information, see phased-out versions.

    • MySQL 5.7: rds_20230228

    • MySQL 8.0: rds_20230324

  • Uses the pay-as-you-go billing method

  • Is in the Running state

  • Is a primary instance with no read-only instances attached

  • Does not use X-Engine as the storage engine

  • Has the database proxy feature disabled

  • Has SSL encryption disabled

  • Does not use a custom master key (CMK) for cloud disk encryption

Note

Check these requirements on the instance details page of the ApsaraDB RDS console. If the instance uses the subscription billing method, first change it to pay-as-you-go, then proceed with this topic.

Limitations

  • The billing method can be changed between pay-as-you-go and serverless at most once within 24 hours.

  • If serverless instances are not supported in the zone where the instance resides, or if zonal resources are insufficient, the change cannot be completed.

Potential impacts

Connection interruption

Changing the billing method triggers an instance switchover, which causes a connection interruption. Configure your application to automatically reconnect after the interruption. For details on what happens during a switchover and how to handle it, see Impacts of an instance switchover.

Performance schema

If the performance schema (PFS) feature is enabled on the instance, enabling it on a serverless instance increases memory usage and reduces RDS Capacity Unit (RCU) scaling efficiency.

Usage notes

  • After the change, the instance auto-scales based on workload and adjusts innodb_buffer_pool parameters automatically. Any custom values previously set for innodb_buffer_pool_size and innodb_buffer_pool_instances can be ignored.

  • Set the maximum RCUs to at least the number of CPU cores on the original instance. For example, if the original instance has 4 CPU cores, set the maximum RCUs to 4 or higher. This prevents performance degradation after the switch.

Billing

The change operation itself is free. For pricing details, see Pricing of serverless ApsaraDB RDS instances.

Change the billing method to serverless

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.

  2. On the Basic Information page, in the Configuration Information section, click Change to Serverless.

    image

  3. On the buy page, configure the following parameters in the Advanced Settings section: Also set the Switching Time to control when the change takes effect.

    Note

    For details on each parameter, see Create a serverless ApsaraDB RDS instance.

    ParameterDescription
    RDS Capacity Units (RCUs)Set the minimum and maximum RCUs.
    Scaling PolicyDefines how RCUs scale up and down based on workload.
    Automatic Stop and RestartAutomatically pauses the instance when idle and resumes it when needed.
  4. Review the Note and Terms of Service, then click Confirm Order. During the change, the instance status changes to Upgrading/Downgrading. After the change completes, the status returns to Running.

FAQ

After changing to serverless, a new purchase order appears in Expenses And Costs > Orders. Why?Expenses And Costs > Orders

Changing to serverless creates a new serverless instance and migrates data from the original instance to it. This migration generates a new purchase order.

Why can't I change the billing method when CMK is used for cloud disk encryption?

Serverless instances use general-purpose instance types, which only support service keys (Default Service CMK) for cloud disk encryption. Custom master keys (CMKs) are not supported. For more information, see the cloud disk encryption announcement.

Is the Sequence Engine feature supported after the change?

Yes. The Sequence Engine is supported on serverless instances. For details, see Sequence Engine.

API reference

Use the ModifyDBInstanceSpec API to perform this change programmatically.

Set the following parameters:

ParameterRequired value
PayTypeServerless
DBInstanceClassmysql.n2.serverless.1c
Important

Make sure that other parameters, such as DBInstanceStorage, are not specified or are configured with the same values as the original instance. You cannot change the values of these parameters. Also verify that the original instance uses pay-as-you-go billing before calling the API.

What's next