All Products
Search
Document Center

ApsaraDB RDS:Create a serverless ApsaraDB RDS for PostgreSQL instance

Last Updated:Jan 09, 2026

To meet changing business needs with a cost-effective database solution, you can purchase serverless ApsaraDB RDS for PostgreSQL instances. Serverless instances provide real-time elasticity for CPU and memory. This lets you use a pay-as-you-go billing method for computing resources, which reduces costs and improves business flexibility. This topic describes how to create a serverless ApsaraDB RDS for PostgreSQL instance.

Prerequisites

If you use a Resource Access Management (RAM) user to create an ApsaraDB RDS instance, the RAM user must have the AliyunRDSFullAccess permission. For more information about how to grant permissions, see Authorize a RAM user.

Billing

Creating a serverless ApsaraDB RDS for PostgreSQL instance incurs charges. These charges include fees for RDS Capacity Units (RCUs) and storage. For more information about billing, see Serverless billing.

Procedure

  1. Go to the ApsaraDB RDS buy page.

  2. You can set Billing Method to Serverless.

  3. Select a Region.

    Select the region where you want to create the ApsaraDB RDS instance.

    Note
    • If your application or client is deployed on an Elastic Compute Service (ECS) instance, create the ApsaraDB RDS instance in the same region as the ECS instance. Otherwise, the ECS instance can access the ApsaraDB RDS instance only over the internet, which prevents optimal performance. You cannot change the region after the ApsaraDB RDS instance is created.

    • If you connect to the ApsaraDB RDS instance from a device other than an ECS instance, such as a local server or computer, select a region that is geographically close to your device. You can then connect to the ApsaraDB RDS instance using its public endpoint.

  4. Select a database Engine.

    This topic uses a serverless ApsaraDB RDS for PostgreSQL instance as an example. Set Engine to PostgreSQL. The supported major engine versions are PostgreSQL 14 or later. PostgreSQL 18 is not supported.

  5. Configure the instance Edition.

    Serverless ApsaraDB RDS for PostgreSQL instances support the Basic Edition and High-availability Edition.

  6. Configure the Storage Type for the instance. Serverless ApsaraDB RDS for PostgreSQL instances currently support only the Premium ESSD and ESSD PL1 storage types.

  7. Configure serverless parameters.

    Note

    You can modify the serverless parameters after the instance is created. For more information, see Change the scaling range of RCUs, Change the elastic policy of an instance, and Configure the automatic start and stop feature.

    Parameter

    Description

    Example

    RDS Capacity Units (RCUs)

    The performance of 1 RCU is equivalent to 1 vCPU and 2 GB of memory. The Minimum value is 0.5 RCU and the Maximum value is 32 RCU. After you set the minimum and maximum values, the instance automatically scales its resources within the specified range based on the workload.

    Note

    The maximum number of connections is fixed at 2,400 and does not change with the number of RCUs.

    • Minimum: 0.5 RCU

    • Maximum: 14 RCU

    Scaling Policy

    Modify the Elastic Policy. RCU scaling for a serverless instance usually takes effect immediately and does not affect your services. In rare cases, a transient disconnection may occur. You can configure whether to forcefully perform RCU scaling in such cases.

    Note

    The probability of a transient disconnection is very low. This is a contingency policy for extreme cases.

    Do Not Execute Forcefully

    Automatic Stop and Restart

    Enable or disable the Automatic Start and Stop feature for the serverless instance. If you enable this feature and no connections are made to the instance for 10 minutes, the instance is automatically suspended.

    If the instance is suspended, it automatically resumes when a connection is established.

    shutdown

  8. Select a zone for the primary node.

    How to select a zone

    • There is no significant difference between zones in the same region.

    • An ECS instance that accesses an ApsaraDB RDS instance in the same zone delivers better performance than one that accesses an ApsaraDB RDS instance in a different zone within the same region. However, the performance difference is minor.

      Note

      If the target zone is sold out, try another zone.

  9. If the instance Edition is High-availability Edition, you must also select a Deployment Method and a Zone of Secondary Node.

    We recommend that you select Multi-zone Deployment. In this deployment mode, the primary and secondary nodes are in different zones within the same region to provide cross-zone disaster recovery.

  10. Set the Storage Capacity.

    Drag the slider to select the storage capacity. The selected storage capacity is the minimum amount for which you will be billed. For example, if you select 100 GB of storage when you create a serverless instance, you are charged for 100 GB even if you use less than 100 GB. If your storage usage exceeds 100 GB, the serverless instance automatically scales out, and you are charged for the actual usage.

    Important

    The automatic storage expansion feature is enabled by default for serverless instances and cannot be disabled. After the storage is automatically expanded, it cannot be automatically scaled in. This is to ensure data integrity. Monitor your bills. You can manually scale in the storage. For more information, see Reduce the storage capacity of an ApsaraDB RDS for PostgreSQL instance that uses cloud disks.

  11. Click Next: Instance Configuration.

  12. Select a VPC and a vSwitch of Primary Node.

    If you use an ECS instance to connect to the ApsaraDB RDS instance over an internal network, select the same VPC as the ECS instance. If the ECS instance and the ApsaraDB RDS instance are in different VPCs, they cannot connect to each other over an internal network.

    Note
    • If the ECS instance and the ApsaraDB RDS instance are in the same VPC but use different vSwitches, they can still connect to each other over an internal network.

    • If the instance edition is High-availability Edition, you must also select a vSwitch of Secondary Node.

  13. Add to Whitelist: Specifies whether to add the CIDR block of the selected VPC to an IP address whitelist of the RDS instance. Selecting Yes allows ECS instances in the selected VPC to access the RDS instance.

  14. Configure other custom parameters. If you do not have special requirements, you can use the default values.

    Parameter

    Description

    Parameter Template

    You can create a custom template in advance and apply it when you create an instance. If you do not specify a template, the system uses the default template. For more information, see Use a parameter template.

    Release Protection

    You can enable Release Protection for the instance to prevent it from being accidentally released. For more information, see Enable or disable the release protection feature.

    Resource Group

    Select the default resource group or a custom resource group to facilitate instance management.

    Time Zone

    Set the time zone for the instance.

    SLR Authorization

    If this is the first time you create an ApsaraDB RDS for PostgreSQL instance after October 10, 2022, you must authorize the service-linked roles (SLRs) AliyunServiceRoleForRdsPgsqlOnEcs and AliyunServiceRoleForRDSProxyOnEcs. This allows the ApsaraDB RDS service to use these roles to attach elastic network interfaces (ENIs) and establish network links.

    Note

    Instance Description

    A custom description for the instance. The description must be 2 to 255 characters in length. It must start with a letter or a Chinese character and can contain digits, underscores (_), and hyphens (-).

    Privileged Account

    You can select Configure Now and set the Database Account and Password to create a privileged account at the same time you create the instance. You can also click Configure Later to create the privileged account after the instance is created.

    For more information about privileged accounts, see Create an account.

  15. Click Next: Confirm Order.

  16. Confirm the Parameter Configuration and Quantity, select Terms of Service, and click Pay Now to complete the payment.

  17. View the instance.

    Go to the Instances page. Select the region of the instance from the top navigation bar. Find the instance that you just created by its Creation Time.

    Note

    If the instance fails to be created, the resources in the zone may be insufficient. Try to create the instance in another zone.

What to do next

Create a database and an account

FAQ

Why can't I see the instance that is being created in the instance list?

Possible cause

Description

Suggestion

Incorrect region

The region you are viewing is not the region where you created the instance.

Switch to the correct region in the upper-left corner of the page.

Insufficient resources in the zone

The instance failed to be created because of insufficient resources in the zone.

If the instance fails to be created, you can view the refund on the Orders page.

Select a different zone and retry.

References

  • To change the RCU scaling range for a serverless ApsaraDB RDS for PostgreSQL instance, see Change the scaling range of RCUs.

  • To configure the automatic start and stop feature for an instance, see Configure the automatic start and stop feature.

  • To change the elastic policy of an instance, see Change the elastic policy of an instance.

  • To release a serverless ApsaraDB RDS for PostgreSQL instance, see Release an instance.

  • To create a serverless ApsaraDB RDS for PostgreSQL instance using the API, see Create an ApsaraDB RDS instance.

    API parameters for creating a serverless ApsaraDB RDS for PostgreSQL instance

    Parameter

    Description

    Example

    RegionId

    The region ID. You can call the DescribeRegions operation to query the available region IDs.

    cn-hangzhou

    Engine

    The database type.

    PostgreSQL

    EngineVersion

    The database version.

    Only PostgreSQL 14 or later is supported.

    14.0

    DBInstanceClass

    The instance type.

    • Serverless instance on Basic Edition: pg.n2.serverless.1c

    • Serverless instance on High-availability Edition: pg.n2.serverless.2c

    pg.n2.serverless.1c

    DBInstanceStorage

    The storage capacity.

    Serverless ApsaraDB RDS for PostgreSQL instances support only the ESSD PL1 storage type. The supported storage capacity is 20 GB to 32,000 GB.

    20

    DBInstanceNetType

    The network connection type. The value is fixed as Intranet, which indicates an internal network connection.

    Intranet

    SecurityIPList

    The IP address whitelist of the instance. This specifies the IP addresses that are allowed to access the serverless ApsaraDB RDS for PostgreSQL instance.

    Separate multiple entries with commas (,). Entries cannot be repeated. A maximum of 1,000 entries are supported.

    10.10.XX.XX

    PayType

    The billing method.

    The value is fixed as Serverless for serverless ApsaraDB RDS for PostgreSQL instances.

    Serverless

    ZoneId

    The ID of the primary node's zone.

    cn-hangzhou-i

    ZoneIdSlave1

    If you purchase a serverless instance on High-availability Edition, you must also pass the ID of the secondary node's zone.

    cn-hangzhou-h

    InstanceNetworkType

    The network type of the instance. The value is fixed as VPC.

    VPC

    VPCId

    The VPC ID.

    vpc-bp****

    VSwitchId

    The vSwitch ID. If you specify ZoneSlaveId1 (the secondary zone ID), you must enter two vSwitch IDs separated by a comma (,).

    vsw-bp****

    DBInstanceStorageType

    The storage type of the instance.

    The value is fixed as cloud_essd for serverless ApsaraDB RDS for PostgreSQL instances.

    cloud_essd

    Category

    Instance specifications.

    • Basic Edition: serverless_basic

    • High-availability Edition: serverless_standard

    serverless_basic

    ServerlessConfig

    The settings of the serverless ApsaraDB RDS instance.

    MaxCapacity

    The maximum number of RCUs for automatic scaling.

    Valid values: 1 to 14

    12

    MinCapacity

    The minimum number of RCUs for automatic scaling.

    Valid values: 0.5 to 14

    0.5

    AutoPause

    Specifies whether to enable the automatic start and stop feature.

    • true: Enable

    • false (default): Disable

    true

    SwitchForce

    Specifies whether to forcefully scale the serverless ApsaraDB RDS for PostgreSQL instance. Valid values:

    • true: Forcefully execute

    • false (default): Do not forcefully execute

    true