To meet evolving business needs and use cost-effective database solutions, you can purchase serverless ApsaraDB RDS for PostgreSQL instances. Serverless RDS instances allow you to scale CPU and memory resources in real time and provide pay-as-you-go billing for computing resources. This reduces costs and improves business flexibility. This topic describes how to create a serverless ApsaraDB RDS for PostgreSQL instance.
Prerequisites
The AliyunRDSFullAccess policy is attached to the RAM user that you use to create an RDS instance. For more information, see Use RAM for resource authorization.
Billing rules
The fee for a serverless RDS instance consists of the fees that are generated for RDS Capacity Units (RCUs) and storage resources. For more information, see Pricing of serverless ApsaraDB RDS for PostgreSQL instances.
Procedure
Go to the ApsaraDB RDS buy page.
Set the Billing Method parameter to Serverless.
Configure the Region parameter.
Select the region in which you want to create the RDS instance.
NoteIf your application or client is deployed on an Elastic Compute Service (ECS) instance, we recommend that you set this parameter to the region in which the ECS instance resides. If the RDS instance and the ECS instance reside in different regions, you cannot connect these instances over an internal network. In this case, these instances cannot deliver optimal performance. You cannot change the region after the RDS instance is created.
If your application is deployed on an on-premises server or on-premises computer, we recommend that you select a region that is near your on-premises server or on-premises computer. This way, you can use the public endpoint of the RDS instance to connect to the RDS instance from your application.
Configure the Database Engine parameter.
In this topic, PostgreSQL is selected. The supported major engine versions are PostgreSQL 14 or later.
Configure the Edition parameter.
Basic Edition and High-availability Edition are supported.
Configure the Storage Type parameter. Valid values: General ESSD and PL1 ESSD.
Configure serverless-related parameters.
NoteThe serverless-related parameters can be modified after the serverless RDS instance is created. For more information, see Change the scaling range of RCUs, Change the scaling policy of RCUs, and Configure the automatic start and stop feature.
Parameter
Description
Example
RDS Capacity Units (RCUs)
The performance of an RCU is equivalent to the performance of an RDS instance that has 1 CPU core and 2 GB of memory. The minimum value of the Minimum parameter is 0.5. The maximum value of the Maximum parameter is 14. After you configure the Minimum and Maximum parameters, the serverless RDS instance automatically scales the RCUs within the range of the values based on the actual workload.
NoteThe maximum number of connections that can be established to a serverless RDS instance is fixed as 2,400 and does not vary based on the number of RCUs.
Minimum: 0.5
Maximum: 14
Scaling Policy
The scaling policy for a serverless RDS instance. In most cases, the RCU scaling for the serverless RDS instance immediately takes effect and does not affect your workloads. In some special cases, transient connections may occur on the serverless RDS instance. You can specify whether to forcefully scale the RCUs when transient connections occur.
NoteTransient connections are countermeasures for emergency cases. The probability of transient connections is extremely low.
Do Not Execute Forcefully
Automatic Stop and Restart
Specifies whether to enable the automatic start and stop feature. After the feature is enabled, if no connections are established to the RDS instance within 10 minutes, the instance is suspended.
After a connection is established to the RDS instance, the instance automatically resumes.
Disabled
Select a zone for the primary node.
Select a zone.
No significant differences exist between the zones in the same region.
If the RDS instance resides in the same region as the ECS instance that you want to connect, these instances can deliver optimal performance. If the RDS instance and the ECS instance reside in different zones in the same region, the performance of these instances slightly decreases.
NoteIf Sold Out appears in the name of the zone that you selected, try another zone.
If the Edition parameter is set to High-availability Edition, you must configure the Deployment Method and Zone of Secondary Node parameters.
We recommend that you set the Deployment Method parameter to Multi-zone Deployment. In this deployment method, the primary RDS instance and the secondary RDS instance reside in different zones of a region to provide cross-zone disaster recovery.
Configure the Storage Capacity parameter.
Drag the slider to adjust the storage capacity. You are charged for the total storage capacity of your serverless RDS instance. For example, if you select 100 GB of storage capacity when you create a serverless RDS instance, you are charged based on 100 GB even if you use less than 100 GB of storage. If the storage usage exceeds 100 GB, the system automatically scales up the storage capacity of the serverless RDS instance, and you are charged based on the actual usage.
ImportantBy default, the automatic storage expansion feature is enabled for serverless RDS instances. You cannot disable this feature. After an automatic storage expansion, the storage capacity cannot be automatically reduced. This helps ensure data integrity. Pay attention to your bills. You can manually reduce the storage capacity of serverless RDS instances. For more information, see Reduce the storage capacity of an ApsaraDB RDS for PostgreSQL instance that uses cloud disks.
Click Next: Instance Configuration.
Configure the VPC and vSwitch of Primary Node parameters.
If you want to connect an RDS instance to your ECS instance over an internal network, select the same VPC as the ECS instance for the RDS instance. If you select a different VPC for your RDS instance, you cannot connect your RDS instance and ECS instance over an internal network.
NoteYou can connect the RDS instance and the ECS instance over an internal network even if the instances use different vSwitches in the same VPC.
If the Edition parameter is set to High-availability Edition, you must configure the vSwitch of Secondary Node parameter.
Configure the Add to Whitelist parameter to specify whether to add the CIDR block of the selected VPC to an IP address whitelist of the RDS instance. If you select Yes for the Add to Whitelist parameter, the ECS instances that reside in the selected VPC can access the RDS instance.
Configure other custom parameters. If you do not have special business requirements, you can retain the default values of these parameters.
Parameter
Description
Parameter Template
You can create a custom template before you create an RDS instance. When you create an RDS instance, you can select the created custom template. If you do not create a custom template, use the default parameter template. For more information, see Use a parameter template to configure the parameters of ApsaraDB RDS for PostgreSQL instances.
Release Protection
You can select Release Protection to prevent the RDS instance from being released due to unintended operations. For more information, see Enable or disable the release protection feature for an ApsaraDB RDS for PostgreSQL instance.
Resource Group
You can use the default resource group or select a custom resource group based on your business requirements. This facilitates instance management.
Time Zone
You can specify a time zone for the RDS instance.
You must enter a time zone name for this parameter. Time zones represented in UTC offsets are not supported. For example, you can enter Asia/Shanghai. For more information about time zones, see Common time zones for ApsaraDB RDS for MySQL instances and ApsaraDB RDS for PostgreSQL instances.
If you do not specify this parameter, the system assigns the default time zone of the region that you specify for the RDS instance. For more information, see Default time zones for ApsaraDB RDS for PostgreSQL instances.
SLR Authorization
If this is the first time you create an RDS instance after October 10, 2022, you must create the AliyunServiceRoleForRdsPgsqlOnEcs and AliyunServiceRoleForRDSProxyOnEcs service-linked roles (SLRs) for ApsaraDB RDS for PostgreSQL. The roles are used to establish network connections by binding elastic network interfaces (ENIs) to the server on which your RDS instance resides.
NoteFor more information about service-linked roles, see Service-linked roles.
SLR authorization is required only when you create an RDS instance for the first time.
SLR authorization does not generate fees.
For more information about SLR authorization, see [Product changes/Feature changes] SLR authorization is required to create an ApsaraDB RDS for PostgreSQL instance from October 10, 2022.
Instance Description (Optional)
You can enter a description for the RDS instance. The value must be 2 to 255 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.
Privileged Account
You can select Configure Now and configure the Database Account and Password parameters to create a privileged account when you create the RDS instance. You can also select Configure Later and create a privileged account after the RDS instance is created.
For more information about privileged accounts, see Create an account.
Click Next: Confirm Order.
Confirm the configuration in the Parameter Configuration section, configure the Quantity parameter, read and select Terms of Service, and then click Pay Now to complete the payment.
View the serverless RDS instance.
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance based on the Creation Time parameter.
NoteAn RDS instance may fail to be created because of insufficient resources in the specified zone. In this case, create the instance again in another zone.
What to do next
Create a database and an account on an ApsaraDB RDS for PostgreSQL instance
FAQ
After I submit an order to create an RDS instance, I cannot find the serverless RDS instance that is in the Creating state. Why?
Possible cause | Description | Suggestion |
Incorrect region | The region that you selected is not the region where the RDS instance resides. | In the top navigation bar, select the region in which the RDS instance resides. Then, you can find the RDS instance. |
Insufficient resources | The zone that you selected cannot provide sufficient resources. You can go to the Orders page to view the refund. | Select a different zone and try again. |
References
For more information about how to change the scaling range of RCUs for a serverless RDS instance, see Change the scaling range of RCUs.
For more information about how to configure the automatic start and stop feature for a serverless RDS instance, see Configure the automatic start and stop feature.
For more information about how to change the scaling policy of a serverless RDS instance, see Change the scaling policy of RCUs.
For more information about how to release a serverless RDS instance, see Release or unsubscribe from an ApsaraDB RDS for PostgreSQL instance.
For more information about how to create a serverless RDS instance by calling an operation, see Create an instance.