We're excited to announce new enhancements in Convox v3 that bring full support for AWS RDS managed database resources. This update allows users to create and manage database resources such as MariaDB, MySQL, and PostgreSQL via AWS RDS, offering improved durability, scalability, and performance for your Convox-managed applications.
AWS RDS (Relational Database Service) provides a scalable and highly available managed database solution within the AWS cloud ecosystem. It simplifies database management tasks such as backups, patching, and scaling while ensuring high availability and durability. With this integration, Convox users can leverage the benefits of AWS RDS to enhance their application's data management capabilities.
AWS RDS resources now support integrated read replicas. You can configure read replicas to improve read scalability and reliability. Read replicas allow you to create read-only copies of your database, providing multiple instances for read operations while reducing the load on the primary database.
To configure a read replica, use the readSourceDB
option in your convox.yml
:
resources:
mydb:
type: rds-postgres
options:
storage: 100
class: db.t3.large
version: 13
dbrr:
type: rds-postgres
options:
readSourceDB: "#convox.resources.mydb"
services:
web:
resources:
- mydb
- dbrr
Immutable Attributes for Read Replicas:
To promote a read replica to an active primary DB, remove the readSourceDB
option from the convox.yml
and redeploy.
With the new database import feature, you can import any AWS RDS managed database into Convox, whether it was originally created by Convox or not. This feature simplifies integrating existing databases into your Convox-managed applications.
To import a database, set the import
option along with the masterUserPassword
:
resources:
mydb-import:
type: rds-postgres
options:
import: mydb-rtest-rc6-7924r-postgres-rds-check
masterUserPassword: ${MYDBPASS}
services:
web:
resources:
- mydb-import
Usage:
import
option with the masterUserPassword
before deploying.import
option is set, the database will act as a passive linked access database.import
option and redeploy to manage the database through Convox.Snapshots allow you to restore your database from a specific point in time using the snapshot feature. This allows you to create a new database instance from a snapshot, ensuring your data can be quickly recovered and utilized.
To restore from a snapshot, configure the snapshot
option:
resources:
db-from-snap:
type: rds-postgres
options:
storage: 10
snapshot: test-v3-rds-snapshot-postgres
services:
web:
resources:
- db-from-snap
Usage:
snapshot
option with the snapshot identifier to restore from a snapshot.snapshot
option and redeploy to enable options management from the convox.yml
.Immutable Attributes for Snapshots:
AWS RDS resources are defined with a rds-
prefix followed by the database type (e.g., rds-mariadb
, rds-mysql
, rds-postgres
). Below is a general example of how to define AWS RDS resources in your convox.yml
:
resources:
database:
type: rds-postgres
options:
class: db.m5.large
storage: 100
version: 13
deletionProtection: true
durable: true
encrypted: true
backupRetentionPeriod: 7
preferredBackupWindow: 02:00-03:00
preferredMaintenanceWindow: sun:05:00-sun:06:00
services:
web:
resources:
- database
Read replicas are ideal for applications requiring high read throughput. They can be used to:
Database import simplifies integrating existing databases into Convox-managed environments, allowing:
Snapshots provide a reliable way to:
The addition of AWS RDS managed database resources in Convox v3 underscores our commitment to providing robust, scalable, and efficient solutions for your containerized applications. By leveraging AWS RDS, you can enhance your data management capabilities, ensuring your applications can efficiently handle data with improved durability and scalability. Explore these new features to take your application's data management to the next level.