This topic describes how to create an ApsaraDB RDS for PostgreSQL instance in the ApsaraDB RDS console. You can also create an RDS instance by calling an API operation.
Prerequisites
The AliyunRDSFullAccess and AliyunBSSOrderAccess policies are attached to the RAM user that you use to create an RDS instance. For more information, see Use RAM for resource authorization.
Procedure
Step 1: Configure basic settings
Go to the ApsaraDB RDS buy page.
Configure the Billing Method parameter.
Billing method
Description
Benefit
Subscription
A subscription instance is an instance for which you pay an upfront fee. For long-term use, we recommend that you select the Subscription billing method. If you select the subscription billing method, you must specify the Duration parameter in the lower-left section of the page.
For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are offered lower prices for longer subscription periods.
Pay-as-you-go
You are charged an hourly fee for a pay-as-you-go instance based on your actual resource usage. For short-term use, we recommend that you select the Pay-As-You-Go billing method.
You can create a pay-as-you-go RDS instance. After you confirm that the created RDS instance meets your business requirements, you can change the billing method of the RDS instance to subscription.
You can release a pay-as-you-go RDS instance at any time. The billing of a pay-as-you-go RDS instance stops immediately after you release the RDS instance.
Serverless
If you want to run scheduled tasks, your business workloads frequently change, or the business workloads are fully managed or do not require O&M, we recommend that you select Serverless.
NoteFor more information about how to create a serverless RDS instance, see Create a serverless ApsaraDB RDS for MySQL instance.
For more information about serverless, see Overview of serverless ApsaraDB RDS for MySQL instances.
If you select Serverless, you are charged based on your consumption of resources for workloads. This can help reduce costs.
NoteYou can view the price in the lower-right corner of the page. The price is displayed only after you configure all required parameters.
Configure the Region parameter.
We recommend that you create the RDS instance in the same region as the Elastic Compute Service (ECS) instance on which your application is deployed. If the RDS instance and the ECS instance reside in different regions, these instances cannot communicate over an internal network. As a result, these instances cannot deliver optimal performance.
NoteAfter an RDS instance is created, you cannot change the region of the RDS instance. If an ECS instance connects to an RDS instance over an internal network, make sure that the RDS instance and the ECS instance reside in the same region.
For more information about how to view the region in which an ECS instance resides, see Get ready to use ApsaraDB RDS for MySQL.
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, Edition, Architecture, and Storage Type parameters.
Configure the Database Engine parameter.
In this example, MySQL is selected.
We recommend that you select MySQL 8.0 or MySQL 5.7 or select the database engine version that is run by your self-managed MySQL instance. The default value of this parameter is MySQL 8.0.
NoteServerless RDS instances support MySQL 5.7 and MySQL 8.0.
Configure the Edition parameter.
RDS edition
Description
Benefit
RDS Basic Edition
In RDS Basic Edition, the database system consists of only one primary RDS instance.
RDS Basic Edition is cost-effective and is suitable for learning and testing.
RDS instances that run the RDS Basic Edition require a long period of time to restart or recover from faults.
RDS High-availability Edition
In RDS High-availability Edition, the database system consists of a primary RDS instance and a secondary RDS instance. These instances work in the high availability architecture. You can create read-only RDS instances and attach the read-only RDS instances to the primary RDS instance.
RDS High-availability Edition is suitable for more than 80% of business scenarios that require production environments.
RDS Cluster Edition
This is the recommended RDS edition. In RDS Cluster Edition, the database system consists of a primary node and multiple secondary nodes.
These nodes work in the high availability architecture. The secondary nodes support read operations.
NoteThe available RDS editions vary based on the region and database engine that you select.
Serverless RDS instances run only RDS Basic Edition.
RDS Cluster Edition supports only MySQL 8.0 and MySQL 5.7.
For more information, see Overview of ApsaraDB RDS editions.
Configure the Architecture parameter. Valid values: X86 and ARM.
NoteFor more information about the x86 architecture and the ARM architecture, see Architectures.
Configure the Storage Type parameter.
Item
ESSD (recommended)
Local SSD
Scalability
★★★★★
The storage capacity can reach up to 32 TB.
No transient connections occur during storage capacity expansion.
You can upgrade, downgrade, create, or release an RDS instance within minutes.
The automatic storage expansion is supported.
★★
You can increase the storage capacity up to 6 TB.
Transient connections occur during storage expansion.
A few hours may be required to upgrade, downgrade, create, or release an RDS instance.
Automatic storage expansion is not supported.
Performance
★★★★★
PL1<PL2<PL3
An enhanced SSD (ESSD) of performance level 2 (PL2) provides twice the IOPS and throughput of a PL1 ESSD.
A PL3 ESSD provides 20 times the IOPS and 11 times the throughput of a PL1 ESSD.
NoteApsaraDB RDS provides three storage types. For more information, see Storage types.
★★★★★
Helps reduce I/O latencies and improve I/O performance.
Backup
★★★★★
A backup can be completed in minutes or seconds.
The highest backup frequency is once every 15 minutes.
★★★
A backup requires a long period of time to complete.
The highest backup frequency is one backup every week.
NoteRDS instances that run MySQL 5.7 or MySQL 8.0 on RDS Basic Edition support only cloud disks. RDS instances that run MySQL 5.5 or MySQL 5.6 on RDS High-availability Edition support only local disks. Serverless RDS instances support only cloud disks.
The available features vary based on the storage type that you select. For more information, see MySQL 8.0.
Select the zone in which the RDS instance resides.
Select a zone.
No significant differences exist between the zones in the same region.
If the RDS instance resides in the same zone as the ECS instance on which your application is deployed, 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 the RDS instance and the ECS instance is slightly lower than the performance of the RDS instance and the ECS instance that reside in the same zone.
Select a deployment method.
Multi-zone Deployment: This is the recommended deployment method. The primary RDS instance and the secondary RDS instance reside in different zones to achieve zone-disaster recovery.
If you set the Deployment Method parameter to Multi-zone Deployment, you must configure the Zone of Primary Node and Zone of Secondary Node parameters.
Single-zone Deployment: The RDS instance and the secondary RDS instance reside in the same zone.
If you set the Edition parameter to Basic, only the Single-zone Deployment method is supported.
NoteIf your database system consists of primary and secondary RDS instances, we recommend that you select Multi-zone Deployment to achieve cross-zone disaster recovery.
If you set the Edition parameter to Cluster Edition, you must select the number of secondary nodes and the zones of the primary and secondary nodes.
Configure the Instance Type parameter.
Configure the Category parameter. You can select General-purpose or Dedicated.
Instance type
Description
Benefit
General-purpose instance family
A general-purpose RDS instance exclusively occupies the allocated memory and I/O resources.
A general-purpose RDS instance shares CPU and storage resources with the other general-purpose RDS instances that are deployed on the same host.
General-purpose RDS instances are cost-effective.
Dedicated instance family
A dedicated RDS instance exclusively occupies the allocated CPU, memory, storage, and I/O resources.
NoteThe dedicated host instance family is the highest configuration of the dedicated instance family. A dedicated host RDS instance exclusively occupies all the CPU, memory, storage, and I/O resources of the host on which the RDS instance is deployed.
A dedicated RDS instance delivers higher performance and higher stability.
NoteAn RDS instance that runs RDS Basic Edition does not support the dedicated instance family.
Configure detailed specifications, including cores and memory capacity.
In a test environment, select an instance type that provides one or more cores.
In a production environment, select an instance type that provides four or more cores.
NoteFor more information about instance types, see Primary ApsaraDB RDS for MySQL instance types (x86).
If you set the Edition parameter to Cluster, the Pricing column displays the price per node in the cluster. If you purchase one primary node and two secondary nodes for the cluster, the price of the cluster is triple the price that is displayed in the Pricing column.
Configure the Capacity parameter.
The valid values of the Capacity parameter vary based on the instance type and storage type that you select.
You can change the storage capacity at a step size of 5 GB.
NoteIf you select High-availability and the standard SSD or ESSD storage type, you can select Automatic Storage Expansion. You can specify the conditions based on which automatic expansion is triggered and the upper limit for storage capacity. If automatic expansion is triggered, ApsaraDB RDS automatically increases the storage capacity based on the larger value between 5 GB and 15% of the current storage capacity. This helps prevent the RDS instance from being locked due to insufficient storage resources.
Optional. If you set the Billing Method parameter to Subscription and select the Local SSD storage type, configure the following parameters.
If you set the Billing Method parameter to Subscription and select the Local SSD storage type, configure the Backup Retention After Release parameter. The policy based on which ApsaraDB RDS retains the backup data of the RDS instance after the RDS instance is released. If the RDS instance contains crucial data, we recommend that you select Latest or All. This way, you can retrieve the data if the data is lost due to overdue payments.
If you set the Billing Method parameter to Subscription, configure the Duration parameter based on your business requirements.
In the lower-right corner of the page, click Next: Instance Configuration.
Step 2: Configure advanced settings
Configure the Network Type parameter.
Configure the network type for the RDS instance.
If your application is deployed on an ECS instance, the network type of the ECS instance and the RDS instance must be the same. Otherwise, you cannot connect the ECS instance and the RDS instance over an internal network.
NoteYou need to check the network type of your ECS instance before you create an RDS instance. For more information, see Get ready to use ApsaraDB RDS for MySQL.
If the ECS instance does not need to communicate with the RDS instance over an internal network, you can select the classic network type or the VPC network type.
Specific RDS instances do not support the classic network type.
Configure the VPC and VSwitch of Primary Node parameters.
NoteIf you select the VPC network type, you must also select a VPC and a vSwitch. We recommend that you select the VPC of the ECS instance on which your application is deployed. If you select a different VPC for your RDS instance, you cannot connect your RDS instance and ECS instance over an internal network.
Configure the Add to Whitelist parameter to specify whether to add the CIDR block of the selected VPC to a whitelist of the RDS instance.
If you set the Network Type parameter to VPC, you must specify whether to add the CIDR block of the selected VPC to the 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.
NoteIf you set the Add to Whitelist parameter to No, you can configure a whitelist after the RDS instance is created. For more information, see Configure an IP address whitelist for an ApsaraDB RDS for MySQL instance.
Configure the Port parameter.
Valid values: 1000 to 5999. You can initialize the port when you create the RDS instance.
Configure more custom parameters. If you do not have special business requirements, you can retain the default values of these parameters.
Parameter
Description
Default Storage Engine
InnoDB: an open source default storage engine that can provide comprehensive features. This is the recommended storage engine.
X-Engine: developed by Alibaba. X-Engine is compatible with InnoDB and provides a high compression ratio. This helps save more than 60% of storage capacity.
NoteThis parameter is available only when you select MySQL 8.0 and High-availability or Basic in the previous step.
Parameter Template
Select the high-performance, asynchronous, default, or custom parameter template based on your business requirements. The parameters in the parameter template are displayed on the right. For more information, see Use a parameter template to configure the parameters of ApsaraDB RDS for MySQL instances.
NoteThis parameter is available only when you select High-availability or Basic in the previous step.
Time Zone
Select a time zone for the RDS instance.
NoteThis parameter is available only when you select High-availability or Basic in the previous step.
Table Name
Specify whether the table name is case-sensitive. Default value: Case-insensitive. If the names of on-premises databases are case-sensitive, we recommend that you select Case-sensitive to facilitate data migration.
NoteThis parameter is available only when you select High-availability or Basic in the previous step.
Release Protection
Specify whether to enable the release protection feature. The release protection feature is used to prevent a pay-as-you-go 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 MySQL instance.
Minor Version Upgrade Policy
Configure a policy based on which the minor engine version of the RDS instance is updated.
Automatic Upgrade: The system automatically updates the minor engine version of the RDS instance to the most recent version during the maintenance window. We recommend that you use this method. You can change the update time on the Scheduled Events tab. For more information, see Set the maintenance window of an ApsaraDB RDS for MySQL instance and Manage scheduled events of an ApsaraDB RDS for MySQL instance.
Manual Upgrade: You must manually update the minor engine version of the RDS instance on the Basic Information page.
If you do not want to use the latest minor engine version, select Select Minor Version. Then, you can select a minor engine version from the drop-down list that is displayed.
Resource Group
Use the default resource group or select a custom resource group based on your business requirements. This facilitates instance management.
Privileged Account
If you select Now, you must configure the Database Account, Password, and Confirm Password parameters to create a privileged account. If you select Later, you can create a privileged account after the RDS instance is created.
For more information about privileged accounts, see Create a privileged account.
In the lower-right corner of the page, click Next: Confirm Order.
Step 3: Confirm the order
Confirm the configuration of the RDS instance in the Parameters section, configure the Purchase Plan and Duration parameters, read and select Terms of Service, and then click Pay Now. You must configure the Duration parameter only when you select the subscription billing method for the RDS instance.
NoteIf you select the subscription billing method for the RDS instance, we recommend that you select Auto-Renew Enabled. This prevents interruptions on your workloads even if you forget to renew the RDS instance.
The Congratulations. or "The service is activated message is displayed in the ApsaraDB RDS console.
View the new 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.
NoteIt requires 1 to 10 minutes to create a serverless RDS instance. You can refresh the page to view the new RDS instance.
What to do next
Create databases and accounts for an ApsaraDB RDS for MySQL instance
FAQ
After I create an RDS instance, why does the ApsaraDB RDS console not respond and why am I unable to find the RDS instance?
Possible cause | Description | Suggestion |
Incorrect region | The RDS instance does not reside in the region that you selected. | 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. If the RDS instance cannot be created, you can go to the Orders page in the Billing Management console to view the refunded fees. | Select a different zone and try again. |
RAM policies that do not allow users to create unencrypted RDS instances | RAM policies that do not allow users to create unencrypted RDS instances are attached to a RAM user.
For more information, see Use RAM policies to manage the permissions of RAM users on ApsaraDB RDS instances. | When you create an RDS instance, select the standard SSD or ESSD storage type, select Disk Encryption, set the Key parameter, and then try again. |
References
For more information about how to create an RDS instance by calling an operation, see Create an instance.
For more information about how to create an RDS instance that runs a different database engine, see the following topics: