Supabase

更新时间:
复制 MD 格式

RDS Supabase is a managed Supabase service provided by RDS for PostgreSQL. You can use this service to quickly build backend services on top of RDS for PostgreSQL, ideal for use cases such as minimum viable product (MVP) validation, AI Application Development, and SaaS platforms.

Features

What is Supabase?

Supabase is an open-source Backend-as-a-Service (BaaS) platform designed to provide developers with features similar to Firebase. Supabase is fully open-source and supports self-hosting. Built on PostgreSQL, the platform provides core services such as a database, authentication, file storage, and Realtime capabilities, making it ideal for developers who need to rapidly build an application backend.

  • Supabase provides a complete backend toolkit for building applications, allowing you to use the entire suite or select only the components you need.

  • The core capabilities of Supabase include a database, authentication and authorization, object storage, edge functions, Realtime, vectors, and artificial intelligence (AI).

Core capabilities of RDS Supabase

RDS Supabase provides the core features of open-source Supabase, optimized to run on the cloud-native infrastructure of RDS for PostgreSQL.

  • Database

    • Provides standard PostgreSQL capabilities and additional extensions. It also supports proprietary RDS for PostgreSQL extensions, such as using Supabase with the rds_ai extension to build AI applications.

    • Supports auto-generated Data APIs, including CRUD, RESTful, and GraphQL APIs.

  • Authentication and authorization

    Provides a complete user management system that supports multiple authentication methods and can be integrated separately.

  • Object storage

    • Provides direct integration with the RDS Cold Storage service, which is built on Alibaba Cloud OSS.

    • Fully compatible with the Alibaba Cloud OSS protocol, allowing you to seamlessly integrate your application with OSS.

    • Supports advanced features such as resumable uploads and storage compression.

  • Realtime

    • When data changes, updates are synchronized to all connected clients in real time.

    • Stores and synchronizes the online status of all users across all clients.

    • Supports channel subscriptions and broadcasting.

  • Vectors and AI

    • Vector service

      • Uses the built-in rds_pgvector extension to store, index, and access embeddings.

      • Storing vectors with transactional data in the same database simplifies your application and improves performance.

    • API integration

      Easily connects to any large language model (LLM) or embeddings API, including Hugging Face and SageMaker.

    • AI assistant

      Includes a built-in Model Studio (Bailian) token to provide LLM services directly through Qwen.

Use cases

  • Minimum viable product (MVP) validation

    Helps startups and independent developers release a viable application sooner for a faster time-to-market.

    • After designing your prototype, you can quickly generate backend services with simple table configurations.

    • Quickly integrate features like Supabase authentication and message subscriptions to significantly improve development efficiency.

  • AI Application Development

    By combining RDS Supabase with PostgreSQL, you get an all-in-one solution for developing AI applications.

    • RDS for PostgreSQL provides multi-modal data storage and retrieval capabilities based on the rds_pgvector extension.

    • RDS Supabase provides API endpoints for your application.

    • You can use the rds_ai capability to quickly connect with model services from Model Studio (Bailian) and PAI.

  • SaaS platforms

    With RDS Supabase, business teams can efficiently develop internal platforms throughout the full lifecycle. This helps enterprises monitor project data in real time, manage content assets collaboratively, and improve cross-departmental efficiency.

Prerequisites

If you use a Resource Access Management (RAM) user to access this feature, the RAM user must have the following permissions. For instructions on granting permissions, see Grant permissions to a RAM user.

  • AliyunRDSAIReadOnlyAccess or AliyunRDSAIFullAccess: Read-only or full management permissions for AI Application Development in RDS.

  • AliyunVPCFullAccess: Permissions to manage VPCs.

  • AliyunRDSFullAccess: Permissions to manage RDS.

  • AliyunRAMReadOnlyAccess: Read-only permissions for Resource Access Management (RAM), which allows viewing users, groups, and authorization information.

Billing

  • RDS for PostgreSQL instance fees

    When you create an RDS Supabase project, you must create an RDS for PostgreSQL instance within it. You will be charged for the RDS instance type and storage. The instance uses the same billing method as the project.

  • Public NAT gateway and EIP fees

    If you choose to enable a public NAT gateway when creating an RDS Supabase project, you will be charged public NAT gateway fees and EIP fees on a pay-as-you-go basis.

Important

The General Purpose Supabase service platform is free. You only pay for RDS for PostgreSQL instance fees, public NAT gateway fees, and EIP fees.

Free trial

If you are a new RDS user (meaning you have never been charged for any RDS product), you can create an RDS for PostgreSQL instance in your project for free when creating an RDS Supabase project:

  • Edition: High-availability Edition

  • Instance family: General Purpose

  • Instance type: pg.n2.2c.2m (General Purpose, 2 vCPUs, 4 GB memory)

  • Storage: 50 GB (The storage for the free trial must be set to 50 GB)

Click here to start creating a free trial RDS Supabase instance. For detailed steps, see RDS Supabase Free Trial Tutorial.

Note

On the Free Trial page, click Trial Rules to check if you are eligible. If you are eligible but still cannot create the free instance, please submit a free trial application.

Usage notes

  • Currently, only PostgreSQL major version 17 and later are supported.

  • Do not delete or modify the databases and associated accounts automatically created by the RDS Supabase project. Doing so renders the project unusable.

Create an RDS Supabase project

  1. Go to the RDS console. In the left-side navigation pane, click AI Application Development.

  2. Select a region at the top of the page, and then click Create Project on the RDS Supabase page.

  3. On the page that appears, configure the RDS Supabase parameters.

    Parameter

    Description

    RDS Supabase project name

    Enter a name for the RDS Supabase project.

    Region

    The region where the RDS Supabase project is located.

    Public NAT gateway

    Enables a public NAT gateway. You must enable this option if you need to use external custom models accessed over the public internet in the RAG Agent.

    Important
    • If you have already configured a public NAT gateway for the vSwitch in the RDS Supabase project's network, do not select this parameter. You can check whether a public NAT gateway is enabled for the corresponding vSwitch on the NAT Gateway console.

    • Enabling a public NAT gateway automatically binds an Elastic IP Address (EIP) and incurs NAT gateway billing and EIP billing.

    VPC

    Select the VPC for the RDS Supabase project.

    • If you have an existing VPC that meets your network planning needs, you can select it directly.

    • If you do not have a suitable VPC, you can use the default VPC and vSwitch. For more information, see VPC and vSwitch.

    • If the default VPC and vSwitch do not meet your requirements, create a VPC and vSwitch first. For instructions, see VPC and vSwitch.

    Primary zone and network

    Select the primary availability zone and vSwitch.

    Supabase type

    Currently, only General Purpose is supported.

    Dashboard username

    Dashboard password

    Set the password for the default user supabase.

    RAG Agent

    Enable the RAG Agent.

    The RAG Agent has built-in models. If you use external custom models that require public internet access, you must enable the Public NAT Gateway for the agent.

    Billing method

    Supports subscription and pay-as-you-go.

    Engine

    The engine version of the RDS for PostgreSQL instance in the RDS Supabase project. Currently, only PostgreSQL 17 is supported.

    SLR Authorization

    Authorization is required only on first use and does not incur any fees. Click Go to Authorization to authorize the Service-Linked Roles (AliyunServiceRoleForRds and AliyunServiceRoleForRdsPgsqlOnEcs).

    Edition

    Select the edition of the RDS for PostgreSQL instance in the RDS Supabase project.

    • Basic Edition: A single-node, read-only instance that is cost-effective and suitable for learning or testing. Fault recovery and restarts take a long time.

    • High-availability Edition: A primary node and a secondary node provide high availability. This edition is suitable for production environments and is suitable for over 80% of use cases.

    Instance family

    Select the instance family of the RDS for PostgreSQL instance in the RDS Supabase project.

    • General Purpose: Dedicated memory and I/O with shared CPU and storage. Offers a lower price and excellent value.

    • Dedicated: Dedicated memory, I/O, CPU, and storage. Provides superior and stable performance.

    Note

    The Basic Edition does not support dedicated instance types.

    Instance type

    Select the instance type for the RDS for PostgreSQL instance in the RDS Supabase project.

    Note

    For supported instance types, refer to the information on the console. For more details, see RDS for PostgreSQL instance types.

    Storage

    Set the storage capacity for the RDS for PostgreSQL instance in the RDS Supabase project.

    Database password

    Set the database password for the RDS for PostgreSQL instance in the RDS Supabase project.

  4. After confirming the configuration, click Buy Now.

    After the project is created, you can view it in the RDS Supabase list.

Log on to the Supabase console

  1. Go to the RDS console. In the left-side navigation pane, click AI Application Development.

  2. Select a region at the top of the page, and then in the RDS Supabase list, click the Project ID of the target project to go to the details page.

  3. On the Basic Information tab, in the Allowlist Information section, click Add Allowlist Group to add the IP address of your client to the allowlist.

    Note

    If you have already configured an allowlist, you can directly click the Public Endpoint to go to the Supabase logon page.

  4. Click the Public Endpoint in the Network Information section to go to the Supabase logon page.

    For more information about using Supabase, see Getting Started | Supabase Docs.

    Note
    • If you are logging on from an ECS instance in the same VPC as the RDS Supabase project, we recommend using the Internal Endpoint.

    • In the Actions column, click View Details. In the Basic Information dialog box that appears, you can view detailed information about the instance.

Delete an RDS Supabase project

  1. Go to the RDS console. In the left-side navigation pane, click AI Application Development.

  2. Select a region at the top of the page. In the RDS Supabase list, find the target project and click Delete in the Actions column.

  3. In the dialog box that appears, click OK.

    Important

    Deleting an RDS Supabase project does not automatically delete the RDS for PostgreSQL instance, public NAT gateway, or EIP created with it. You must manually release the instance, delete the public NAT gateway, and release the EIP.

FAQ

How do I view data in the RDS for PostgreSQL database of my RDS Supabase project?

When you create an RDS Supabase project and its RDS for PostgreSQL instance, a corresponding database is automatically generated. You can log on to this database to view related data.

  1. In the RDS Supabase list, click the Managed Instance ID of the target RDS Supabase project to go to the RDS for PostgreSQL instance details page.

  2. In the left-side navigation pane, click Databases to view the name of the database and its corresponding account automatically created for the RDS Supabase project.

    Note

    The account password is the Database Password you set when creating the RDS Supabase project.

  3. In the left-side navigation pane, click Whitelist and SecGroup and configure an allowlist to allow external devices to access the RDS for PostgreSQL instance.

  4. Connect to the PostgreSQL database to view the data.

References and APIs

  • RDS Supabase SDK User Guide: Describes how to obtain the Supabase URL and Supabase Key, and how to use the RDS Supabase SDK in various programming languages.

  • RDS Supabase Best Practices: Demonstrates how to use RDS Supabase to quickly build an AI application with knowledge processing and intelligent decision-making capabilities through a complete Agentic RAG application development process.

  • Related APIs For APIs related to RDS Supabase, see Supabase API Reference.

Appendix: Obtain a service API key

  • Method 1: Use an API (DescribeInstanceAuthInfo - Query authentication information for an RDS AI application instance)

  • Method 2: Use the Supabase console

    This example uses the Chrome browser (version 139.0.7258.128).

    1. Enable the Insecure origins treated as secure feature in your browser and add the endpoint of your RDS Supabase project to the feature's allowlist.

      1. In Chrome, go to chrome://flags/#allow-insecure-localhost.

      2. In the search box, enter Insecure origins treated as secure, find the feature, and enable it.

      3. Add the endpoint of your RDS Supabase project (for example, the Public Endpoint) to the text box for the Insecure origins treated as secure feature, and then restart the browser.

        image

    2. Obtain the service API key.

      1. Log on to the RDS Supabase project.

      2. Click the image icon in the upper-right corner and select Command menu.

        image

      3. Click Get API keys. On the page that appears, click Copy service API key to copy the key.