Relational Databases
Amazon RDS and Amazon Aurora
1. Managed vs. Unmanaged Databases
Running a standalone relational database on-premises or on EC2 requires you to manage server maintenance, OS patches, database software installation, backups, high availability, and scaling. Amazon RDS offloads these tasks to AWS so you can focus on application optimization.
| Responsibility | On-Premises | EC2-Hosted | Amazon RDS |
|---|---|---|---|
| Application optimization | You | You | You |
| Scaling / High Availability | You | You | AWS |
| Database backups | You | You | AWS |
| Database software patches | You | You | AWS |
| OS installation and patches | You | You | AWS |
| Server maintenance / Power / Rack | You | AWS | AWS |
2. Amazon RDS
Amazon Relational Database Service is a managed service that sets up, operates, and scales a relational database in the cloud. It provides cost-efficient, resizable capacity while automating time-consuming administration tasks.
Supported Database Engines
- MySQL
- MariaDB
- PostgreSQL
- Oracle
- Microsoft SQL Server
- IBM DB2
RDS DB Instances
The basic building block of RDS is the database instance — an isolated database environment that can contain multiple user-created databases. Each instance has a DB instance class (CPU, memory, network) and storage type (Magnetic, General Purpose SSD, or Provisioned IOPS). Instances typically run in a private VPC subnet accessible only to application instances.
Multi-AZ Deployment
After enabling Multi-AZ, RDS automatically creates a standby copy of the database instance in another Availability Zone within the same VPC. Transactions are synchronously replicated to the standby.
Read Replicas
Read replicas use asynchronous replication from the source database. They offload read queries from your primary instance and support read-heavy workloads. Read replicas can be created in different Regions and can be promoted to the primary manually.
| Feature | Multi-AZ | Read Replica |
|---|---|---|
| Replication type | Synchronous | Asynchronous |
| Primary purpose | High availability / DR | Read scaling |
| Failover | Automatic | Manual promotion |
When to Use RDS
- Complex transactions or complex queries
- Medium to high query/write rate (up to 30,000 IOPS)
- No more than a single worker node or shard
- High durability requirements
3. Amazon Aurora
Amazon Aurora is a MySQL- and PostgreSQL-compatible relational database built for the cloud. It combines the performance and availability of high-end commercial databases with the simplicity and cost-effectiveness of open-source databases.
Key Features
- High availability: Stores multiple copies of data across multiple Availability Zones with continuous backups to S3. Supports up to 15 read replicas.
- Instant crash recovery: Restarts in less than 60 seconds in most cases. Buffer cache survives restart.
- Fully managed: Automates provisioning, patching, backup, recovery, failure detection, and repair.
- Compatible: Drop-in compatibility with MySQL and PostgreSQL. Use existing database tools with little or no change.
- Security: Network isolation via VPC, encryption at rest via AWS KMS, encryption in transit via SSL.
4. Quick Quiz
Test Your Understanding
Select one answer per question. You will receive immediate feedback.