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 RDS instance is an instance for which you pay an upfront fee. If you want to use an RDS instance for a long period of time, we recommend that you select the Subscription billing method. If you select the subscription billing method, configure the Duration parameter in the lower-left corner of the page.
The subscription billing method is more cost-effective than the pay-as-you-go billing method for long-term usage. Alibaba Cloud provides lower prices for longer subscription durations.
Pay-as-you-go
You are charged on an hourly basis for a pay-as-you-go RDS instance based on your actual resource usage. If you want to use an RDS instance for a short period of time, 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 based on your business requirements. The billing cycle of a pay-as-you-go RDS instance immediately stops 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.
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 you want to connect an ECS instance and 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 computer, we recommend that you select a region that is near your on-premises server or 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, Product Type, 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 your self-managed MySQL instance runs. 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 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 high availability (HA) mode. 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 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 HA mode. The secondary nodes support read operations.
NoteThe available RDS editions vary based on the region and database engine that you select.
RDS Cluster Edition supports MySQL 8.0 and MySQL 5.7.
For more information, see Overview of ApsaraDB RDS editions.
Configure the Product Type parameter.
NoteYou can select Standard or Cost-effective. For more information, see Product types.
If your RDS instance runs RDS Basic Edition, you do not need to configure this parameter.
Configure the Storage Type parameter.
Item
ESSD (recommended)
Local SSD
Scalability
★★★★★
You can increase the storage capacity up to 32 TB.
No transient connections occur during storage capacity expansion.
You can upgrade, downgrade, create, or release an RDS instance within minutes.
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
A performance level 2 (PL2) enhanced SSD (ESSD) delivers twice the IOPS and throughput of a PL1 ESSD.
A PL3 ESSD delivers IOPS that is up to 20 times the IOPS delivered by a PL1 ESSD. A PL3 ESSD also delivers throughput that is up to 11 times the throughput delivered by a PL1 ESSD.
NoteApsaraDB RDS provides three storage types. For more information, see Storage types.
★★★★★
I/O latencies are reduced, and I/O performance is improved.
Backup
★★★★★
A backup can be completed in a few minutes or seconds.
The highest backup frequency is once every 15 minutes.
★★★
A backup requires a long period of time.
The highest backup frequency is one backup every day.
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 for the RDS instance.
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.
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 primary RDS instance and the secondary RDS instance reside in the same zone.
If you set the Edition parameter to Basic Edition, 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
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
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 CPU cores and memory capacity.
For a test environment, select an instance type that provides one or more CPU cores.
For a production environment, select an instance type that provides four or more CPU cores.
NoteFor more information about instance types, see Primary ApsaraDB RDS for MySQL instance types (x86).
If you set the Edition parameter to Cluster Edition, 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 value range varies 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 storage expansion is triggered, the system 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. 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.
NoteThe default value is VPC.
Configure the VPC and VSwitch of Primary Node parameters.
NoteWe recommend that you select the VPC in which your ECS instance resides 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.
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.
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 other 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 Edition or Basic Edition 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.
NoteThis parameter is available only when you select High-availability Edition or Basic Edition in the previous step.
Time Zone
Select a time zone for the RDS instance.
NoteThis parameter is available only when you select High-availability Edition or Basic Edition in the previous step.
Table Name Case Sensitivity
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 Edition or Basic Edition 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 where the RDS instance resides. Then, find the RDS instance based on the Creation Time parameter.
NoteThe system requires 1 to 10 minutes to create an RDS instance. You can refresh the page to view the new RDS instance.
What to do next
Create databases and accounts. For more information, see Create databases and accounts.
FAQ
After I create an RDS instance, 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: