AWS RDS: Fundamentals & Supported Engines
Amazon RDS (Relational Database Service) is a managed relational database service. AWS handles provisioning, patching, backups, and failover. You focus on schema, queries, and application logic.
RDS vs Self-Managed on EC2
RDS: automated backups, Multi-AZ, read replicas, patching, monitoring — you give up OS access
EC2 self-managed: full control (custom extensions, OS tuning), but you own all ops work
RDS vs Aurora: Aurora is AWS-proprietary, MySQL/PostgreSQL-compatible, 5x faster than MySQL, auto-scales storage, costs more
Choose RDS when you need standard PostgreSQL/MySQL features without Aurora pricing
Supported Engines
PostgreSQL 11–17 (most feature-rich, recommended for new projects)
MySQL 8.0 / MariaDB 10.6+ (popular, wide tooling support)
Oracle — bring your own license or license-included (expensive)
Microsoft SQL Server — Standard/Enterprise editions, Windows Auth support
Db2 — IBM database, added 2023
Instance Classes
Family | vCPU | RAM | Use Case
-----------|------|--------|---------------------------
db.t3/t4g | 2-8 | 1-32GB | Dev/test, burstable (cheap)
db.m6g/m7g | 2-96 | 8-384GB| General purpose production
db.r6g/r7g | 2-96 | 16-768GB| Memory-intensive (large caches)
db.x2g | 4-128| 61-980GB| SAP, very large in-memory workloadsStorage Types
gp3 (General Purpose SSD): baseline 3000 IOPS + 125 MB/s, configurable up to 16000 IOPS — default choice
io1/io2 (Provisioned IOPS): up to 64000 IOPS, for OLTP with consistent low latency
Storage autoscaling: set max threshold, RDS expands automatically when 10% free
Creating an RDS Instance
# Create PostgreSQL instance
aws rds create-db-instance \
--db-instance-identifier my-postgres \
--db-instance-class db.t3.medium \
--engine postgres \
--engine-version 16.1 \
--master-username admin \
--master-user-password "SecureP@ssw0rd" \
--allocated-storage 100 \
--storage-type gp3 \
--db-subnet-group-name my-db-subnet-group \
--vpc-security-group-ids sg-abc123 \
--backup-retention-period 7 \
--multi-az \
--storage-encrypted \
--no-publicly-accessible
# Wait for it to be available
aws rds wait db-instance-available --db-instance-identifier my-postgres
# Get endpoint
aws rds describe-db-instances \
--db-instance-identifier my-postgres \
--query 'DBInstances[0].Endpoint'Connecting
# PostgreSQL
psql -h my-postgres.abc123.eu-west-1.rds.amazonaws.com \
-U admin -d mydb -p 5432
# MySQL
mysql -h my-mysql.abc123.eu-west-1.rds.amazonaws.com \
-u admin -p --port 3306 mydb
# From application (connection string)
# postgresql://admin:password@host:5432/mydb
# mysql://admin:password@host:3306/mydbParameter Groups & Option Groups
# Create custom parameter group
aws rds create-db-parameter-group \
--db-parameter-group-name my-pg16-params \
--db-parameter-group-family postgres16 \
--description "Custom PostgreSQL 16 parameters"
# Tune key parameters
aws rds modify-db-parameter-group \
--db-parameter-group-name my-pg16-params \
--parameters \
"ParameterName=shared_buffers,ParameterValue={DBInstanceClassMemory/4},ApplyMethod=pending-reboot" \
"ParameterName=max_connections,ParameterValue=200,ApplyMethod=pending-reboot" \
"ParameterName=log_min_duration_statement,ParameterValue=1000,ApplyMethod=immediate"
# Apply to instance
aws rds modify-db-instance \
--db-instance-identifier my-postgres \
--db-parameter-group-name my-pg16-params \
--apply-immediatelyKeep your own version of these notes — editable, searchable, and organised by your stack.
Start free