Skip to main content

03. AWS RDS & Amazon Aurora


01. AWS RDS​

Amazon RDS (Relational Database Service) is a fully managed service for relational databases on AWS.

It allows you to run databases that use SQL as the query language without managing infrastructure.

🧠 Key Features​

FeatureDescription
Managed ServiceAWS handles provisioning, patching, backups, and recovery.
Supported EnginesMySQL, PostgreSQL, MariaDB, Oracle, SQL Server.
High AvailabilityMulti-AZ deployments for automatic failover.
ScalabilityVertical (instance size) and horizontal (read replicas).
BackupsAutomated continuous backups with Point-in-Time Restore.
MonitoringCloudWatch metrics and dashboards for performance insight.
StorageBacked by EBS volumes (gp2, gp3, or io1).
Access RestrictionNo SSH access β€” AWS fully manages the OS layer.

🧭 Where RDS Fits in Cloud Architecture​

So, when we say β€œWhere RDS fits in architecture,” we’re talking about how RDS is used inside a typical cloud application setup.

Most web applications follow a three-tier structure:

Tier 1 – Load Balancer (Front-end): This is what receives all incoming web traffic from users. The load balancer spreads requests evenly across multiple servers so no single server gets overloaded. Example: AWS Application Load Balancer (ALB).

Tier 2 – EC2 Instances (Application layer): These are the actual servers that run your application code β€” for example, a website backend, APIs, or business logic. When a user logs in or adds something to a cart, the EC2 instance processes that request and needs to read or save some data.

Tier 3 – RDS Database (Data layer): This is where all the structured data is stored β€” like users, orders, messages, or payments. Instead of each EC2 server storing data locally, they all connect to the same RDS database so they can share data consistently.

IAM Roles Example

Why Use RDS Instead of a DB on EC2?​

TaskOn EC2On RDS
Database installationManualAutomated
OS patchingManualAWS-managed
BackupsManual scriptsAutomatic
High availabilityCustom setupMulti-AZ
MonitoringManual CloudWatch setupBuilt-in
MaintenanceManualScheduled maintenance window

πŸ—„οΈ Amazon RDS Deployment Options​

Amazon RDS offers multiple deployment options to balance performance, availability, and cost:

  • Read Replicas β†’ Improve read scalability
  • Multi-AZ β†’ Provide high availability
  • Multi-Region β†’ Enable global disaster recovery

πŸ” 1. Read Replicas​

  • Scale the read workload of db, in other words it allows hr scaling.
  • Can create upto 15 Read Replicas.
  • Data is only written in main db.

πŸ” 2. Multi-AZ​

  • Failover safe in case of AZ outage.
  • Data is only read/written to the main database.
  • Can only have I other AZ as failover.

πŸ” Read Replicas vs Multi-AZ​

FeatureRead ReplicasMulti-AZ
PurposeScale read workload.Provide failover and availability.
Replication TypeAsynchronous.Synchronous.
Data AccessOnly read operations allowed.Main DB handles both reads and writes.
Failover CapabilityManual promotion to master if needed.Automatic failover to standby instance.
Number of ReplicasUp to 5 Read Replicas per DB instance.One standby in another AZ.
Use CaseAnalytics, reporting, heavy read queries.Critical production systems needing HA.
IAM Roles Example

🌍 3. Multi-Region Deployments​

Multi-Region (Cross-Region Read Replicas)

FeatureDescription
Disaster RecoveryMaintain database availability if a full AWS region fails.
PerformanceProvide low-latency reads for global users.
ReplicationAsynchronous across regions (replication lag possible).
CostAdditional charges for inter-region data transfer and replication.
IAM Roles Example

Summary​

  • Read Replicas β†’ Improve read performance and scalability.
  • Multi-AZ β†’ Ensure high availability and automatic failover.
  • Multi-Region β†’ Enable global reach and disaster recovery.
  • Choose deployment type based on business continuity, performance, and cost needs.

02. Amazon Aurora​

Amazon Aurora is a cloud-optimized, high-performance relational database built by AWS.
It’s compatible with MySQL and PostgreSQL engines.

πŸš€ Key Benefits​

FeatureDescription
PerformanceUp to 5Γ— faster than MySQL and 3Γ— faster than PostgreSQL on RDS.
Scalable StorageAuto-expands in 10 GB increments up to 128 TB.
ReplicationUp to 15 read replicas supported.
Multi-AZ SupportFor fault tolerance and high availability.
Fully ManagedNo OS or database maintenance required.
Cost~20% higher than RDS, but more cost-efficient due to performance gains.

πŸŒ€ Aurora Serverless​

Aurora Serverless offers on-demand, auto-scaling database capacity.

FeatureDescription
Supported EnginesMySQL and PostgreSQL
Auto-ScalingScales automatically based on workload demand
No Capacity PlanningAWS manages compute provisioning
Pay per SecondBilling based on actual usage
Ideal Use CasesInfrequent, unpredictable, or variable workloads

Architecture Concept:

  • Clients connect via a proxy fleet.
  • Aurora automatically provisions database instances.
  • All instances share the same distributed storage layer.

πŸ“˜ Summary​

CategoryRDSAurora
Engine SupportMySQL, PostgreSQL, MariaDB, Oracle, SQL ServerMySQL, PostgreSQL
PerformanceStandard3×–5Γ— faster
Storage ScalingManualAuto (10 GB to 128 TB)
PricingLower~20% higher
Read ReplicasUp to 5Up to 15
Serverless OptionβŒβœ… Available
Best ForTraditional managed databasesHigh-performance cloud-native apps

🧩 In short:

Use RDS for managed traditional SQL databases.
Use Aurora (or Aurora Serverless) when you need cloud-native performance, scalability, and automation.