All Products
Search
Document Center

ApsaraDB RDS:Create a serverless ApsaraDB RDS for PostgreSQL instance

Last Updated:Mar 28, 2026

Serverless ApsaraDB RDS for PostgreSQL automatically scales CPU and memory in real time based on workload. You pay only for the RDS Capacity Units (RCUs) and storage you consume. This guide walks you through creating a serverless instance from the console.

Prerequisites

Before you begin, ensure that you have:

  • An Alibaba Cloud account, or a Resource Access Management (RAM) user with the AliyunRDSFullAccess permission. To grant permissions to a RAM user, see Authorize a RAM user.

Billing

A serverless instance incurs charges for two components:

  • RCUs: Billed based on the actual RCUs consumed.

  • Storage: Billed based on provisioned capacity. If usage exceeds the provisioned capacity, the instance scales out automatically and you are charged for the actual usage.

Important

Automatic storage expansion is enabled by default and cannot be disabled. Once storage is expanded, it does not scale back in automatically—this protects data integrity. Monitor your storage usage and manually reduce storage capacity when needed. For details, see Reduce the storage capacity of an ApsaraDB RDS for PostgreSQL instance that uses cloud disks.

For a full pricing breakdown, see Serverless billing.

Key configuration decisions

Review these parameters before you start. Getting them right up front avoids post-creation changes.

Engine version: PostgreSQL 14 or later is supported. PostgreSQL 18 is not supported.

Edition: Choose based on your availability requirements.

EditionUse when
Basic EditionDevelopment, testing, or workloads that can tolerate brief downtime
High-availability EditionProduction workloads requiring cross-zone disaster recovery

RCU range: 1 RCU = 1 vCPU + 2 GB of memory. The instance scales between your configured minimum and maximum automatically.

  • Setting the minimum to 0.5 RCU and enabling Automatic Start and Stop lets the instance pause after 10 minutes of inactivity and resume automatically when a connection arrives. This configuration is recommended for development environments.

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

Storage type: Only Premium ESSD and ESSD PL1 are supported.

Network: The instance must be in the same virtual private cloud (VPC) as any Elastic Compute Service (ECS) instance that connects to it over an internal network.

Create an instance

  1. Go to the ApsaraDB RDS buy page.

  2. Set Billing Method to Serverless.

  3. Select a Region.

    Place the instance in the same region as your ECS instance to avoid internet-only connectivity. You cannot change the region after creation. If you are connecting from a local server or computer (not ECS), select the region geographically closest to you and use the public endpoint.
  4. Set Engine to PostgreSQL. Supported versions: PostgreSQL 14 or later (PostgreSQL 18 is not supported).

  5. Select an Edition: Basic Edition or High-availability Edition.

  6. Select a Storage Type: Premium ESSD or ESSD PL1.

  7. Configure the serverless parameters.

    You can change all of these settings after the instance is created. See Change the scaling range of RCUs, Change the scaling policy, and Configure the automatic start and stop feature.
    ParameterDescription
    RDS Capacity Units (RCUs)Set the Minimum and Maximum RCU values. The instance scales within this range automatically. Valid range: 0.5–32 RCU. Setting the minimum to 0.5 RCU enables the auto pause feature when Automatic Start and Stop is also enabled.
    Scaling PolicyRCU scaling usually takes effect immediately and does not affect your services. In rare cases, a transient disconnection may occur. Select Do Not Execute Forcefully (default) to skip scaling when a disconnection would occur, or Execute Forcefully to scale immediately even if a transient disconnection results.
    Automatic Start and StopWhen enabled, the instance pauses after 10 minutes with no connections and resumes automatically when a connection is established. Recommended for non-production environments.
  8. Select a Zone for the primary node. Zones within the same region perform similarly. If the target zone is sold out, select another zone.

  9. (High-availability Edition only) Select a Deployment Method and a Zone of Secondary Node. Select Multi-zone Deployment to place the primary and secondary nodes in different zones for cross-zone disaster recovery.

  10. Drag the slider to set Storage Capacity. This is the minimum amount billed. For example, if you select 100 GB, you are charged for 100 GB even if you use less.

  11. Click Next: Instance Configuration.

  12. Select a VPC and a vSwitch of Primary Node. Select the same VPC as your ECS instance to enable internal network connectivity. ECS instances in the same VPC but different vSwitches can still connect over the internal network.

    (High-availability Edition only) Also select a vSwitch of Secondary Node.
  13. For Add to Whitelist, select whether to add the VPC's CIDR block to the instance's IP whitelist. Selecting Yes allows all ECS instances in the VPC to access the RDS instance.

  14. (Optional) Configure additional parameters. Default values work for most deployments.

    ParameterDescription
    Parameter TemplateApply a pre-created parameter template. If none is specified, the system uses the default template. See Use a parameter template.
    Release ProtectionPrevents accidental instance deletion. See Enable or disable release protection.
    Resource GroupAssign the instance to a resource group for easier management.
    Time ZoneNamed time zones only (UTC time zones are not supported). The system selects a default based on region if left blank. See Named time zones and region-to-time-zone mappings.
    SLR AuthorizationRequired the first time you create an ApsaraDB RDS for PostgreSQL instance after October 10, 2022. Authorizes the service-linked roles (SLRs) AliyunServiceRoleForRdsPgsqlOnEcs and AliyunServiceRoleForRDSProxyOnEcs so that ApsaraDB RDS can attach elastic network interfaces (ENIs) and establish network links. This is a one-time authorization that does not incur fees. See Service-linked roles.
    Instance DescriptionA custom label for the instance. 2–255 characters, starting with a letter or Chinese character. Accepts digits, underscores (_), and hyphens (-).
    Privileged AccountSelect Configure Now to create a privileged database account during instance creation, or Configure Later to do it afterward. See Create an account.
  15. Click Next: Confirm Order.

  16. Review the Parameter Configuration and Quantity, accept the Terms of Service, and click Pay Now.

  17. Go to the Instances page. Select the instance's region from the navigation bar and locate the instance by Creation Time.

    If the instance fails to create, the zone may have insufficient resources. Try a different zone. You can view any refund on the Orders page.

What's next

Create a database and an account

FAQ

Why can't I see the instance I just created in the instance list?

Possible causeSolution
Incorrect regionSwitch to the correct region in the upper-left corner of the console.
Insufficient zone resourcesThe instance failed to create. Select a different zone and retry. Check the Orders page for a refund.

API reference

To create a serverless ApsaraDB RDS for PostgreSQL instance using the API, call CreateDBInstance. Use the following parameters.

ParameterDescriptionExample
RegionIdThe region ID. Call DescribeRegions to list available regions.cn-hangzhou
EngineThe database engine.PostgreSQL
EngineVersionThe engine version. PostgreSQL 14 or later only.14.0
DBInstanceClassThe instance type. Basic Edition: pg.n2.serverless.1c. High-availability Edition: pg.n2.serverless.2c.pg.n2.serverless.1c
DBInstanceStorageThe storage capacity in GB. Range: 20–32,000.20
DBInstanceNetTypeThe connection type. Fixed value: Intranet.Intranet
SecurityIPListThe IP whitelist. Comma-separated, no duplicates, up to 1,000 entries.10.10.XX.XX
PayTypeThe billing method. Fixed value: Serverless.Serverless
ZoneIdThe primary node's zone ID.cn-hangzhou-i
ZoneIdSlave1(High-availability Edition) The secondary node's zone ID.cn-hangzhou-h
InstanceNetworkTypeThe network type. Fixed value: VPC.VPC
VPCIdThe VPC ID.vpc-bp****
VSwitchIdThe vSwitch ID. For High-availability Edition, provide two IDs separated by a comma.vsw-bp****
DBInstanceStorageTypeThe storage type. Fixed value: cloud_essd.cloud_essd
CategoryThe edition. Basic Edition: serverless_basic. High-availability Edition: serverless_standard.serverless_basic
ServerlessConfig.MaxCapacityThe maximum RCU count. Valid values: 1–14.12
ServerlessConfig.MinCapacityThe minimum RCU count. Valid values: 0.5–14.0.5
ServerlessConfig.AutoPauseWhether to enable auto pause. true: enable. false (default): disable.true
ServerlessConfig.SwitchForceWhether to force RCU scaling when a transient disconnection would occur. true: force. false (default): do not force.true

References