Back to Blog

Introducing AWS RDS Managed Database Resources for v3 Racks

Introducing AWS RDS Managed Database Resources in Convox v3

Introduction

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.

What are AWS RDS Managed Database Resources?

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.

Enhancing Database Management with AWS RDS

Read Replica Support

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:

  • Storage encryption
  • Engine version
  • Storage volume size

To promote a read replica to an active primary DB, remove the readSourceDB option from the convox.yml and redeploy.

Database Import

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:

  • Set the import option with the masterUserPassword before deploying.
  • As long as the import option is set, the database will act as a passive linked access database.
  • Remove the import option and redeploy to manage the database through Convox.

Snapshot Restoration

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:

  • Set the snapshot option with the snapshot identifier to restore from a snapshot.
  • Remove the snapshot option and redeploy to enable options management from the convox.yml.

Immutable Attributes for Snapshots:

  • Storage encryption
  • Engine version
  • Storage volume size

Configuring AWS RDS Managed Database Resources

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

Best Practices and Use Cases

Read Replica Use Cases

Read replicas are ideal for applications requiring high read throughput. They can be used to:

  • Offload read queries from the primary database to improve performance.
  • Enhance the availability and reliability of read-heavy applications.
  • Promote a read replica to a primary database for disaster recovery or scaling purposes.

Database Import Use Cases

Database import simplifies integrating existing databases into Convox-managed environments, allowing:

  • Seamless migration of legacy systems to Convox.
  • Integration of external databases without downtime.
  • Simplified database access management within Convox.

Snapshot Use Cases

Snapshots provide a reliable way to:

  • Backup and restore databases to a specific point in time.
  • Clone databases for testing or staging environments.
  • Ensure data recovery and business continuity.

Conclusion

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.

Let your team focus on what matters.