Amazon RDS (Relational Database Service)

Introduction

  • βœ” Amazon RDS is a managed relational database service by AWS.
  • βœ” Simplifies database setup, operation, and storage auto-scaling.
  • βœ” Supports engines: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, and Amazon Aurora.

Key Features

  • πŸ“Œ Automated Backups – Automatically backs up DB and transaction logs.
  • πŸ“Œ Read Replicas – Enhance read performance and scalability.
  • πŸ“Œ Automated Patching – Keeps DB engine and OS secure and updated.
  • πŸ“Œ Monitoring & Metrics – Integrated with Amazon CloudWatch.

Storage Options

  • βœ” gp2 / gp3 (General Purpose SSD) – Balanced performance.
  • βœ” io1 / io2 (Provisioned IOPS SSD) – High-performance for heavy workloads.
  • βœ” Magnetic (Standard) – ❌ Legacy, not recommended for new apps.

Security

  • πŸ“Œ Encryption at rest using KMS.
  • πŸ“Œ Encryption in transit using SSL/TLS.
  • πŸ“Œ Authentication via IAM or native user credentials.

Amazon RDS Read Replicas – For Read Scalability

Overview

  • βœ” Create read-only copies of your RDS database.
  • βœ” Uses asynchronous replication from the primary DB. (no downtime)
  • πŸ“Œ Helps offload read traffic and improves performance.

Use Cases

  • βœ” Support BI tools, reporting apps, or read-heavy workloads.
  • πŸ“Œ Replicas can be β†’ within Az, Cross Az or Cross Region
    • Same region β†’ βœ… No data transfer cost.
    • Cross-region β†’ ⚠️ Network cost applies.
  • βœ” Replica can be promoted to their own DB

Read Replica Architecture

Key Differences: Read Replica vs Multi-AZ

FeatureRead ReplicaMulti-AZ
PurposeRead scalability / improve readsHigh availability / Disaster recovery
Replication TypeAsynchronous (may lag if reading from)Synchronous
Read Accessβœ… Yes (read-only)❌ No (standby only)
FailoverManual promotion to primary DBβœ… Automatic (single DNS name)

πŸ’‘ Pro Tip: The Read Replicas can be setup as Multi AZ for Disaster Recovery (DR)

Short Downtime (Single-AZ β†’ Multi-AZ)

  • πŸ› οΈ Modify the DB instance. Click Create a standby instance
  • Short downtime during the switchover. Typically a few minutes, took 7 min
  • How it Works?
    • Taking a snapshot of main DB
    • Restoring new DB from snapshot to a new AZ
    • Sync is established between two DB

Same for Aurora - just you can’t disable the automated snapshot

Multi-AZ Setup

Can be used for Migration

Migration Strategy

RDS Deployment Options

RDS Failover