Bring Your Own Database To DBOS Cloud

Bring your own database title
Peter Kraft, Qian Li
May 24, 2024

We’re happy to announce that DBOS Cloud now supports a much-requested feature from our users: bringing your own database!

DBOS Cloud accounts include a free Amazon RDS Postgres instance for storing application data. Many DBOS Cloud users requested the ability to use a different new instance size or access data from an existing database. This new feature allows you to link your own Postgres-compatible database instance to DBOS Cloud and run durable, auto-scaling database applications and workflows against it.

integrating RDS Postgres with DBOS Cloud

Here are some of the benefits of integrating external databases into your DBOS Cloud account:

Resilient database application performance made easy. Serverless database applications running on DBOS Cloud benefit from reliable code execution with transactional correctness guarantees--without having to write your own state machine or use a separate workflow orchestration engine. With BYODB, you can easily build new features with DBOS accessing your existing database.

Database time travel for easier debugging and auditing. If you deploy a DBOS Transact application to a linked database, you can query that application’s database as of any time in the past. All historical information retained for time travel is stored in your own database instance and you have full control over it.

Data custody and control. If you link your own database to DBOS Cloud, you have complete freedom to set your own backup, replication, and security policies.

BYODB Prerequisites

External databases linked to a DBOS Cloud account must meet a few requirements:

PostgreSQL Compatible. You can link any PostgreSQL-compatible database to DBOS Cloud. However, if you plan to use DBOS database time travel, we strongly recommend you use standard PostgreSQL or Amazon RDS PostgreSQL because time travel requires PostgreSQL logical replication.

Minimal Permissions Required. To link a database to DBOS Cloud, you only need to grant DBOS Cloud permissions to read and write your application’s data and, if using time travel, to replicate it.

How It Works

When you deploy a DBOS Transact application to a linked database, DBOS Cloud manages it serverlessly, but connects it to that linked database instead of to a DBOS Cloud-managed database. Because DBOS Transact is built for standard PostgreSQL and time travel leverages PostgreSQL logical replication, linking doesn’t require extensive database configuration or customization.

The following tutorial video demonstrates how to connect an AWS RDS Postgres database to a DBOS Cloud account, and access it from an application running on DBOS Cloud.

To learn more about how to use database linking, check out the DBOS Cloud documentation.  Database linking is currently available for DBOS Pro and DBOS Enterprise subscribers, but you can get started with DBOS Cloud today for free.

© DBOS, Inc. 2024