Creating an Application and Provisioning a New PostgreSQL Instance
Scenarios
This section describes how to create a Supabase AI application on the RDS console. When you create a Supabase AI application, a new RDS for PostgreSQL instance is provisioned and automatically bound to the application to serve as its hosted database.
Prerequisites
- You have registered a Huawei Cloud account.
- If you need fine-grained management of resources on Huawei Cloud, use Identity and Access Management (IAM) to create IAM users and user groups, and grant them specific permissions so that the IAM users can obtain required permissions. For details, see Using IAM Roles or Policies to Grant Access to RDS.
- The account used for login must be granted the following actions: rds:aiApplication:create, rds:aiApplication:list, and rds:aiApplication:listManageableInstances.
- The account used for login must have completed real-name authentication. Otherwise, it cannot connect to Object Storage Service (OBS) and the Storage feature cannot be used.
Procedure
- Log in to the RDS console.
- Click
in the upper left corner and select a region. - In the navigation pane, choose AI App Dev Platform.
- Click Create Supabase App. The page for creating a Supabase application is displayed.
- Configure the parameters and then click Buy in the lower right corner.
- Basic settings Figure 1 Basic settings for an RDS Supabase application
Table 1 Basic settings Parameter
Description
Region
Region where your resources are located.
NOTE:Resources in different regions cannot communicate with each other over a private network. Once a DB instance is created, its region cannot be changed.
- Supabase application configuration Figure 2 RDS Supabase application configuration
Table 2 Application configuration Parameter
Description
Supabase App Name
Name of the Supabase application. Duplicate names are allowed but a distinctive name is recommended for easier management.
The application name must consist of 4 to 64 characters and start with a letter. Only letters (case-sensitive), digits, hyphens (-), and underscores (_) are allowed.
Version
Version of the Supabase application. The version number follows a three-part format.
Deployment Mode
Deployment mode of the Supabase application. Only single-node deployment is supported.
AZ
An AZ is a physical region where resources have independent power supplies and networks. AZs are physically isolated but interconnected through an internal network. Some regions support both single-AZ and multiple-AZ deployments and some only support single-AZ deployment.
NOTE:Supabase is deployed in the primary AZ of the hosted DB instance.
Specification Type
vCPUs and memory of the VM resources allocated to the application.
The default specifications available for Supabase applications are 2 vCPUs | 4 GB and 2 vCPUs | 8 GB, both of which are general-purpose options.
The performance specifications cannot be changed once the application is created.
Instance Specifications
vCPUs and memory of the VM resources used by the application.
The default specifications of Supabase applications are 2 vCPUs | 4 GB. Expansion is not supported.
Dashboard Username
Username for logging in to the Supabase application's dashboard (a web-based console).
The default username for logging in to a Supabase application is supabase and cannot be changed.
Dashboard Password
The password must consist of 8 to 32 characters and contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (~ ! @ # $ % ^ * - _ = + ? ,). Enter a strong password and change it regularly to enhance security and prevent risks like brute-force attacks.
If the password you provide is considered weak, the system will prompt you to enter a stronger one.
Keep this password secure. The system cannot retrieve it if it is lost.
After an application is created, you can reset this password if needed. For details, see Resetting the Application Password.
Storage Configuration
Whether to integrate the Supabase Storage component with Huawei Cloud Object Storage Service (OBS) for storing and managing unstructured data such as images and videos.
This option is unchecked by default, indicating that the Storage feature is disabled. Enable it as required. When this option is enabled, configure the parameters based on Table 3.
Table 3 Storage configuration description Parameter
Description
OBS Bucket
Name of the OBS tenant bucket to integrate with.
The OBS bucket is a tenant bucket created in Huawei Cloud OBS. Ensure that you have full access and control permissions for the bucket, including uploading, viewing, and downloading files.
Access Key ID (AK)
The access key ID (AK) for the user. Ensure that the AK has access permissions to the specified OBS bucket. For details about how to obtain it, see Access Keys.
NOTE:Access keys, comprising an AK and an SK, serve as your enduring identity credentials within Huawei Cloud. They allow you to sign requests made to Huawei Cloud APIs. Huawei Cloud uses AKs to authenticate user identities and SKs to verify request signatures, ensuring the confidentiality, integrity, and correctness of both the requests and the requesting parties' identities.
Secret Access Key (SK)
The secret access key (SK) for the user. Ensure that the SK has access permissions to the specified OBS bucket. For details about how to obtain it, see Access Keys.
NOTE:Access keys, comprising an AK and an SK, serve as your enduring identity credentials within Huawei Cloud. They allow you to sign requests made to Huawei Cloud APIs. Huawei Cloud uses AKs to authenticate user identities and SKs to verify request signatures, ensuring the confidentiality, integrity, and correctness of both the requests and the requesting parties' identities.
- Hosted RDS instance configuration Figure 3 Hosted RDS for PostgreSQL instance configuration (creating a new instance)
Table 4 Hosted instance configuration Parameter
Description
Instance
Select Create New Instance. On the page for purchasing a new RDS for PostgreSQL instance, set the required parameters.
Billing Mode
Billing mode for the hosted DB instance.
- Yearly/Monthly: a prepaid billing mode in which you pay for resources before using them. Bills are settled based on the subscription period. The longer the subscription term, the greater the discount. This mode is a good option for long-term, stable workloads.
- Pay-per-use: a postpaid billing mode. You pay as you go and just pay for what you use. The DB instance usage is calculated by the second but billed every hour. This mode allows for flexible resource adjustment without the risk of over- or under-provisioning.
PostgreSQL Database Version
Version of the hosted instance. Only version 17 and later are supported.
NOTE:Supported versions may vary by region. For the actual options, see them on the console.
Select an appropriate version tailored to your workloads. You are advised to select the latest available version because it is more stable, reliable, and secure.
Do not select any disabled database version to avoid failures during database creation or use.
RDS Deployment Mode + AZ
Set the deployment mode and AZ for the DB instance. Two options are available: Primary/Standby and Single. For a primary/standby instance, you must configure both the primary and standby AZs. For a single-node instance, you only need to configure the primary AZ. The primary AZ must be the same as the AZ of the Supabase application.
- Primary/Standby: uses an HA architecture with a primary instance and a synchronous standby instance. It is suitable for production databases of large- and medium-sized enterprises in Internet, Internet of Things (IoT), retail e-commerce sales, logistics, gaming, and other sectors. Standby instances improve instance reliability. When you create a primary instance, a standby instance is automatically created alongside it. Once created, the standby instance is invisible on the console.
An AZ is a physical region where resources have independent power supplies and networks. AZs are physically isolated but interconnected through an internal network. Some regions support both single-AZ and multiple-AZ deployments and some only support single-AZ deployment.
To achieve high reliability, RDS will automatically deploy your primary and standby instances in different physical servers even if you deploy them in the same AZ. If you attempt to deploy your primary and standby instances in the same AZ in a Dedicated Computing Cluster (DCC) and there is only one physical server available, the creation will fail.
You can deploy your primary and standby instances in a single AZ or across AZs to implement failover and high availability.
- Single: uses a single-node deployment architecture. Unlike the commonly used primary/standby architecture, it contains only one node but offers better cost-effectiveness. It is recommended for development and testing of microsites, and small- and medium-sized enterprises, or for learning about this service.
NOTE:Access keys, comprising an AK and an SK, serve as your enduring identity credentials within Huawei Cloud. They allow you to sign requests made to Huawei Cloud APIs. Huawei Cloud uses AKs to authenticate user identities and SKs to verify request signatures, ensuring the confidentiality, integrity, and correctness of both the requests and the requesting parties' identities.
Instance Specifications
vCPUs and memory. Different instance specifications support different numbers of database connections and maximum IOPS.
For details, see RDS for PostgreSQL Instance Specifications.
After an instance is created, you can change its specifications. For details, see Changing a DB Instance Class.
NOTE:Only general-enhanced instances are allowed for a DCC.
The minimum specifications for instances in production environments are 4 vCPUs and 8 GB of memory. Specifications lower than 4 vCPUs and 8 GB of memory are used only for testing.
Storage Type
The storage type determines the read/write speed of an instance. A higher maximum throughput enables faster read/write operations.
- Cloud SSD: uses cloud SSD for data storage, decoupling compute from storage and supporting elastic capacity expansion.
- Extreme SSD: uses 25GE network and remote direct memory access (RDMA) technologies to provide you with up to 1,000 MB/s throughput per disk and sub-millisecond latency.
NOTE:If Dedicated Distributed Storage Service (DSS) is enabled, the storage type is the type of disks created in the dedicated storage pool.
Administrator
The default login username for the database is root. It cannot be changed.
Administrator Password
The password must consist of 8 to 32 characters and contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (~ ! @ # $ % ^ * - _ = + ? ,). Enter a strong password and change it regularly to enhance security and prevent risks like brute-force attacks.
After an instance is created, you can reset this password if needed. For details, see Resetting the Hosted Instance Password.
NOTE:If the password you provide is considered weak, the system will prompt you to enter a stronger one.
Keep this password secure. The system cannot retrieve it if it is lost.
Confirm Password
This password must be the same as the administrator password.
Enterprise Project
If your account has been associated with an enterprise project, select the target project from the Enterprise Project drop-down list.
For more information about enterprise projects, see Enterprise Management User Guide.
Parameter Template
A parameter template is a collection of engine configuration settings that can be applied to one or more instances of the same DB engine. If you intend to create a primary/standby instance, they use the same parameter template after being created. You can modify the parameter template as required after the instance is created.
NOTICE:If you use a custom parameter template while creating an instance, the following specification-related parameters in this template are not delivered. Instead, the default values are used.
- maintenance_work_mem
- shared_buffers
- max_connections
- effective_cache_size
After an instance is created, you can adjust its parameters as needed. For details, see Modifying Parameters of an RDS for PostgreSQL Instance.
Time Zone
Select a time zone for your instance based on the region hosting your instance. You can select a time zone during instance creation and change it later as needed.
- Network configuration Figure 4 Network configuration for an RDS Supabase application
Table 5 Network configuration Parameter
Description
VPC
The virtual network in which the RDS Supabase application and RDS instance are located. A VPC can isolate networks for different workloads. You can select an existing VPC or create a VPC. For details about how to create a VPC, see "Creating a VPC" in Virtual Private Cloud User Guide.
To use a shared VPC, select a VPC that another account shares with the current account from the drop-down list.
VPC owners can share the subnets in a VPC with one or multiple accounts through Resource Access Manager (RAM). With VPC sharing, you can easily configure, operate, and manage multiple accounts' resources at low costs. For more information about VPC and subnet sharing, see VPC Sharing.
NOTICE:After the RDS Supabase application and hosted instance are created, the VPC cannot be changed.
The Supabase application and hosted instance are in the same VPC.
Subnet
A subnet provides dedicated network resources that are logically isolated from other networks for network security. A subnet is valid only within its AZ. The Dynamic Host Configuration Protocol (DHCP) function must be enabled by default for the subnet in which you plan to create the RDS Supabase application. It cannot be disabled.
NOTICE:Only IPv4 addresses are supported. The subnet cannot be changed. The Supabase application and hosted instance are in the same subnet.
Supabase IPV4
Set a private IP address for the Supabase application. A private IPv4 address is automatically assigned to your Supabase application when you create it. You can also specify an unused private IPv4 address from the subnet CIDR block. The private IP address cannot be changed after the application is created.
RDS IPV4
Set a private IP address for the hosted instance. A private IPv4 address is automatically assigned to your hosted instance when you create it. You can also specify an unused private IPv4 address from the subnet CIDR block. The private IP address cannot be changed after the instance is created.
Database Port
Set the database port for the hosted instance. The default port number is 5432. The port number ranges from 2100 to 9500.
Supabase Security Group
Controls inbound and outbound network traffic and port access for the application through access rules, enhancing access security between the Supabase AI application and other services.
NOTICE:The Supabase application port is fixed to port 8443 by default and cannot be modified. This port listens on the data NIC and binds to the private IP address of the application.
If you want to allow public network access (through DNAT gateway or EIP) to the Supabase application, ensure that the selected security group allows public IP addresses to access the application instance and allows inbound TCP traffic on port 8443.
Ensure that the selected security group also allows access to the hosted database service by permitting outbound TCP traffic on the database port (5432 by default). Otherwise, the application cannot connect to the database, causing the application to enter an abnormal state and its functions to become unavailable.
Only one security group can be configured. Configure appropriate security group rules to prevent security risks.
RDS Security Group
A security group controls network traffic for both inbound and outbound directions and restricts access by port. By default, rules allowing access within the instance's security group are automatically added. In addition, network access control lists (ACLs) allow or deny network traffic entering and exiting subnets.
Security groups apply access rules for instances, enhancing secure communication between RDS and other cloud services. Ensure that the security group you select allows your client (Supabase application) to access the instance.
When creating a hosted instance, you can configure only one security group (for better network performance). In this case, the instance's access rules strictly follow the network rules of this security group.
If no security group is available, RDS assigns one for you.
NOTICE:Inbound rules for the database port must be added to the RDS security group. Otherwise, the Supabase application cannot connect to the database, causing application errors and making features unavailable.
- If the DB instance port is not set (the default port is 5432), you can select the default security group, which has a preset inbound rule for port 5432.
- If the DB instance port has been set (not port 5432), you cannot directly use the default security group and you must ensure that the selected security group has the correct inbound rule for the specified database port.
- Required duration and auto-renewal (required only for yearly/monthly instances) Figure 5 Required duration and auto-renewal configurations for the RDS Supabase application
Table 6 Required duration and quantity settings for the application Parameter
Description
Required Duration (for yearly/monthly instances)
Select the required duration for the hosted instance. The system automatically calculates the corresponding cost based on the selected duration. The longer the subscription term, the greater the discount.
Auto-renew (for yearly/monthly instances)
- This option is not selected by default, and automatic renewal is disabled.
- If you select this option, the instance is automatically renewed for the same subscription period as the original order.
If you have any questions about the price, click Pricing details at the bottom of the page.
- Basic settings
- For the pay-per-use billing mode, complete the creation request for the RDS Supabase application and its hosted DB instance.
- For the yearly/monthly billing mode, submit your order.
- If you need to modify the instance specifications, click Previous.
- If the order details are correct, click Pay Now. Figure 6 Confirming the RDS Supabase application order
Select a payment method and complete the payment.
- After the RDS Supabase application is created, you can view and manage it on the AI App Dev Platform page.
- The system creates a hosted instance for the application first. The Supabase application is created only after the instance is created. The creation process takes about 30 minutes.
- When the hosted instance is being created, its status is Creating. The status changes to Available after the instance is created. The process takes 5–9 minutes.
- The system enables an automated backup policy for the hosted instance during creation by default. You can modify the policy, if needed, after the instance is created. The system creates a full backup once the instance is created.
- After the hosted instance is created, the instance name uses the prefix rds-supabase-pg- by default. You can modify this prefix as needed. You can also add remarks to help categorize instances.
- The default port for the hosted instance is port 5432. It cannot be changed after the instance is created. Specify the port during instance creation.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot