Updated on 2026-11-17 GMT+08:00

Creating an Application and Binding an Existing PostgreSQL Instance

Scenarios

This section describes how to create a Supabase AI application on the RDS console. When creating a Supabase AI application, you can directly bind an existing healthy RDS for PostgreSQL DB instance to the application and use it as the application's hosted database. No new DB instance is created during this process.

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

  1. Log in to the RDS console.
  2. Click in the upper left corner and select a region.
  3. In the navigation pane, choose AI App Dev Platform.
  4. Click Create Supabase App. The page for creating a Supabase application is displayed.
  5. 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 (associating with an existing instance)
      Table 4 Hosted instance configuration

      Parameter

      Description

      Instance

      Select Associate Existing Instance. On the page for selecting an RDS for PostgreSQL instance to be hosted by the Supabase application, select an instance that meets your workload requirements.

      NOTICE:

      Only an available RDS for PostgreSQL primary/standby or single-node non-DR instance running PostgreSQL 17.10.260601 or later can be hosted. The DB instance must be in the same VPC and subnet as the application, and must not be undergoing a high-risk operation or another mutually exclusive operation.

      After the application is created, it automatically binds to the DB instance and uses the instance as its hosted database. This does not affect how you use the database service (for example, accessing and operating the database using a driver). When deleting the application, you can choose whether to retain the DB instance. Business data, such as databases and tables, is not automatically deleted and remains entirely under your control. You can delete it manually as required.

      For production environments, you are advised to select a primary/standby instance whose specifications are at least as large as those of the application. This helps ensure high availability and avoid slow workload responses, insufficient connection pool capacity, and the resulting workload failures caused by resource or performance mismatches.

      Because a Supabase application consumes 40 to 50 default database connections after binding to a hosted DB instance, you are advised to use a relatively idle DB instance (one that is not under heavy load) whenever possible. This helps avoid insufficient database connections that could cause workload interruptions or failures.

      Do not perform any operations on the DB instance while it is being bound to serve as the application's hosted database. The application performs configuration initialization operations on the instance, including creating predefined databases, tables, and users, inserting relevant metadata, and restarting the database process.

      Do not modify the network configuration of the hosted DB instance (including its VPC, subnet, private IP address, and port). You cannot establish a DR relationship for the instance or perform a major version upgrade. These operations may affect application operation.

      The security group associated with the RDS instance must have inbound rules that allow access through the database port. Otherwise, the Supabase application cannot connect to the database, causing the application to enter an abnormal state and its functions to become unavailable.

      Avoid binding the instance during its maintenance window. This helps prevent automatic tasks (such as automatic upgrades and automatic specification changes) from starting unexpectedly during the maintenance window and thereby disrupting the Supabase application's ability to connect to and operate on the database. Such disruptions may cause configuration initialization or application creation to fail.

      Because the DB instance is restarted during the binding process, do not perform backup operations during this process. Also, avoid the automated backup window to prevent backup tasks from conflicting with the initialization operations, which may cause the backup or application creation to fail.

      If a DB instance is retained after its Supabase application is deleted, you must first delete the databases (_supabase and supabase_db) preinstalled by the application before binding the instance to another Supabase application.

      If you create a new DB instance by restoring a backup of a DB instance retained after its associated Supabase application is deleted, or by migrating the retained DB instance using DRS, you must first delete the databases (_supabase and supabase_db) preinstalled by the application before the new instance can be bound to a Supabase application.

      Administrator Password

      Enter the correct password of the root user for logging in to the RDS for PostgreSQL instance. The RDS Supabase application uses the root account to log in to and connect to the RDS for PostgreSQL instance to perform initialization operations.

      NOTICE:

      You must enter the correct password. Otherwise, the Supabase application creation will fail because it cannot connect to the RDS instance, and the instance cannot be hosted. Test the connection to ensure that it succeeds.

      Confirm Password

      Re-enter the password of the root user for logging in to the RDS for PostgreSQL instance. Double-check the password to ensure that it is correct.

    • Network configuration
      Figure 4 Network configuration for an RDS Supabase application
      Table 5 Network configuration

      Parameter

      Description

      VPC

      This parameter cannot be changed. It displays information about the VPC where the hosted DB instance resides.

      NOTICE:

      The VPC cannot be changed after the RDS Supabase application and its hosted DB instance are created. The Supabase application and hosted instance are in the same VPC.

      Subnet

      This parameter cannot be changed. It displays information about the subnet where the hosted DB instance resides.

      NOTICE:

      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.

      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.

  6. After the RDS Supabase application is created, you can view and manage it on the AI App Dev Platform page.

    • The application creation process takes about 30 minutes.
    • During the creation, do not perform any operations on the associated RDS Supabase instance or modify its security group configuration. Otherwise, the RDS Supabase application may be unable to connect to that DB instance, causing the hosting and initialization operations to fail. This may cause application creation to fail or some application functions to work abnormally.