Getting started / Add-Ons /
RDS (Relational Database Service)

RDS (Relational Database Service)

Overview

RDS (Relational Database Service) provides managed PostgreSQL and MySQL databases for your application. Tapitalee automatically provisions Amazon RDS instances in your AWS account, handling database setup, backups, and maintenance.

Purpose and Benefits

  • Managed Database: Fully managed PostgreSQL or MySQL database with automated backups, patching, and monitoring
  • Scalability: Easy vertical scaling by changing instance size without data loss
  • High Availability: Optional Multi-AZ deployment for automatic failover
  • Security: Automatic encryption at rest and in transit, network isolation via VPC
  • Integration: Automatic environment variable injection for seamless app connectivity

CLI Usage

Create RDS Database

Create an RDS PostgreSQL or MySQL database

tapit create rds engine=<postgres|mysql> name=dbname [variable=DATABASE_URL] [storage=20] [version=14.4] [size=db.t4g.micro] [allowed_ip_ranges=0.0.0.0/0] [multi_az=false] [follower_of=parent_db] [--ignore-existing]

Parameters

  • engine: Database engine: postgres or mysql (required, unless follower_of is given)
  • name: Name for the database instance
  • variable: Environment variable name for the connection URL (default: DATABASE_URL)
  • storage: Storage size in GB (default: 20)
  • version: Database engine version
  • size: RDS instance size (default: db.t4g.micro)
  • allowed_ip_ranges: IP address, CIDR ranges, or special values app/vpc/all, that are allowed to access the instance, separated by commas
  • multi_az: Enable Multi-AZ deployment for high availability (true/false)
  • follower_of: Name of an existing active database to create this database as a read replica (follower) of. The engine is inherited from the parent.
  • --ignore-existing: Skip creation if a resource with the same name already exists (useful for idempotent scripts)

Examples

# Basic PostgreSQL database
tapit create rds engine=postgres name=maindb

# MySQL with custom configuration
tapit create rds engine=mysql name=userdb variable=MYSQL_URL storage=100 size=db.t4g.small multi_az=true

# PostgreSQL with restricted access
tapit create rds engine=postgres name=proddb allowed_ip_ranges=10.0.0.0/16,172.16.0.0/12

Modify RDS Database

Update settings for an existing RDS database instance

tapit set rds name=dbname [storage|size|allowed_ip_ranges|multi_az|readonly_user|delete_protection]=value

Parameters

  • name: Name of the RDS database to update (required)
  • storage: Storage size in GB (default: 20)
  • size: RDS instance size (default: db.t4g.micro)
  • allowed_ip_ranges: IP address, CIDR ranges, or special values app/vpc/all, that are allowed to access the instance, separated by commas
  • multi_az: Enable Multi-AZ deployment for high availability (true/false)
  • readonly_user: Provision (true) or remove (false) a read-only database user
  • delete_protection: Enable (true) delete protection for the database (cannot be disabled once enabled)

Examples

# Scale up storage
tapit set rds name=maindb storage=200

# Upgrade instance class
tapit set rds name=maindb size=db.t4g.medium

# Enable high availability
tapit set rds name=maindb multi_az=true

List and Show RDS Instances

List all add-ons attached to the app with their state and configuration

tapit list addons [-w|--wait]

Parameters

  • -w|--wait: Wait until all add-ons reach a stable state (fully ready or fully deleted); exits non-zero if any add-on is in a failed state

Show detailed information about a specific add-on

tapit show addon name=addon_name

Parameters

  • name: Name of the add-on to show (required)

Delete RDS Database

Delete an add-on and all its associated AWS resources

tapit delete addon name=addon_name

Parameters

  • name: Name of the add-on to delete (required)

Warning: This permanently deletes the database and all data. A final snapshot is automatically created before deletion.

Snapshots

Tapitalee automatically takes daily snapshots of RDS instances, retaining 3 days of backups. You can also create manual snapshots:

# Create a manual snapshot
tapit create snapshot addon=dbname name=before-upgrade

# List snapshots
tapit list snapshots addon=dbname

Environment Variables

When you create an RDS database, Tapitalee stores the connection details as a Secret Variable in the app’s Variables section. A secure password is automatically generated and embedded in the connection URL.

  • DATABASE_URL (or custom variable name): Complete connection string, stored as a Secret variable under the app’s Variables

Because it is stored as a Secret variable, the value is only visible to team members with sufficient privileges, and is injected into your application containers at runtime as an environment variable.

Connection String Format

PostgreSQL:

postgres://username:password@hostname:5432/database_name

MySQL:

mysql://username:password@hostname:3306/database_name

Security Considerations

  • Network Isolation: RDS instances are deployed in private subnets
  • Encryption: Data encryption at rest and in transit is enabled by default
  • Access Control: Only your Tapitalee application containers have access to the database credentials.
  • Credentials: A secure password is automatically generated and stored as a Secret variable in the app’s Variables section, embedded in the DATABASE_URL connection string
  • IP Restrictions: Use allowed_ip_ranges to limit access to specific networks

Performance and Scaling

Instance Classes

  • t4g.micro: 2 vCPUs, 1 GB RAM - Development/testing
  • t4g.small: 2 vCPUs, 2 GB RAM - Small applications
  • t4g.medium: 2 vCPUs, 4 GB RAM - Medium workloads
  • m6g.large: 2 vCPUs, 8 GB RAM - Production workloads
  • r6i.large: 2 vCPUs, 16 GB RAM - Memory-intensive applications

Storage Scaling

  • Storage can be increased without downtime
  • Cannot decrease storage size once allocated

Multi-AZ Deployment

  • Provides automatic failover to a standby instance
  • Increases cost but improves availability
  • Recommended for production workloads