Skip to content

Aurora

πŸ”Έ 1. What is Amazon Aurora?

Amazon Aurora is a cloud-native relational database built by AWS, compatible with MySQL and PostgreSQL. It’s designed to deliver:

  • 5x the performance of MySQL

  • 3x the performance of PostgreSQL

  • Enterprise-grade availability and durability

🧠 Key Idea: Aurora is not a re-hosted DB like RDS for MySQL β€” it’s a purpose-built distributed system for speed, scalability, and fault tolerance.


πŸ”Έ 2. Aurora Engine Types

Aurora Engine Compatible With Use Case
Aurora MySQL MySQL 5.6/5.7/8.0 Web apps, legacy migrations
Aurora PostgreSQL PostgreSQL 10–15 Complex queries, analytics
Aurora Serverless Both Auto-scaled, cost-effective dev/test

πŸ”Έ 3. Aurora Architecture Overview

Aurora separates storage and compute, unlike traditional RDS.

              +----------------------+
              | Aurora Writer (RW)   |
              +----------------------+
                    |
       +------------+-------------+
       |                          |
+----------------+     +----------------+
| Aurora Reader  | ... | Aurora Reader  |
+----------------+     +----------------+

        ⬇ Async replication

      +-------------------------+
      |  Aurora Distributed     |
      |  Storage (up to 128 TB) |
      +-------------------------+

πŸ“Œ Key Points:

  • Compute nodes are isolated (Writer + up to 15 Readers)

  • Storage is auto-scaled and distributed across 3 AZs

  • Failures are handled automatically


πŸ”Έ 4. Aurora Performance Benefits

Feature Aurora vs RDS
Write Latency 10x lower (via quorum write)
Read Scaling Up to 15 read replicas
Failover Time < 30 seconds
Auto-healing storage βœ… Yes
Parallel query (PostgreSQL) βœ… Supported

πŸ”Έ 5. Aurora Replication

βœ… Types of Replication:

Type Description
Aurora Replica Native replica in same cluster
Cross-region Replica DR/failover copy in another region
MySQL Read Replica Legacy MySQL-style async replica

πŸ”Έ 6. Aurora High Availability (HA)

βœ… Built-in HA:

  • Storage is replicated across 6 copies in 3 AZs

  • Failover to Aurora Replica happens automatically

  • DNS switches to new Writer

  • No data loss (due to quorum writes)

🧠 No need to configure Multi-AZ β€” it's built-in


πŸ”Έ 7. Aurora Serverless v2

πŸ’‘ What is it?

Aurora Serverless automatically scales the number of ACUs (Aurora Capacity Units) based on load.

Feature Aurora Serverless v2
Auto-scaling βœ… Millisecond-level scaling
Cold Start ❌ No cold starts (v2 improvement)
Connections Supports hundreds
Use Cases Dev/test, variable workloads

πŸ›  You can set min/max capacity, schedule pause/resume, and integrate with Lambda or Fargate.


πŸ”Έ 8. Aurora Global Databases

Used for:

  • Cross-region disaster recovery

  • Low-latency global reads

Feature Description
Regions Supported Up to 5
Replication Delay ~1 second
Write Region One primary
Read Regions Multiple

Failover to a read region converts it to writer in ~1 minute.


πŸ”Έ 9. Aurora Security

Feature Description
IAM Auth IAM roles for DB login
KMS Encryption At-rest and in-transit (TLS)
VPC Isolation Aurora is VPC-only
Secrets Manager Store and rotate DB credentials
Audit Logging Supported (CloudTrail + DB logs)

πŸ”Έ 10. Backups and Snapshots

  • Continuous Backups to S3 (Point-in-time restore)

  • Manual Snapshots supported

  • Fast Cloning: Snapshots can be cloned instantly

  • Restore from Snapshot across regions


πŸ”Έ 11. Monitoring Aurora

Tool Metrics
CloudWatch CPU, memory, storage, replica lag
Performance Insights Query latency, bottlenecks
Enhanced Monitoring OS-level visibility
Events/Logs Slow query log, audit, error logs

πŸ”Έ 12. Aurora Pricing

Component Pricing Model
Compute On-demand per second (ACU or instance)
Storage Per GB-month (auto-scales to 128 TB)
I/O Per million requests (reads/writes)
Backup First 100% of DB size is free
Serverless Pay per ACU-second + I/O

πŸ’‘ You only pay for what you use with Serverless.


πŸ”Έ 13. Aurora vs RDS

Feature Aurora RDS
Performance 3–5x faster Baseline performance
Storage Auto-scaled, 6 copies Fixed GB
Read Replicas Up to 15 Up to 5
Failover ~30s automatic Slower, may require config
OS-level access ❌ No ❌ (unless RDS Custom)
Serverless βœ… Aurora only ❌ Not supported
Global DB βœ… Yes ❌ Not supported

πŸ”Έ 14. Terraform Sample: Aurora MySQL

resource "aws_rds_cluster" "aurora" {
  cluster_identifier      = "aurora-cluster"
  engine                  = "aurora-mysql"
  master_username         = "admin"
  master_password         = "password123"
  backup_retention_period = 7
  skip_final_snapshot     = true
}

resource "aws_rds_cluster_instance" "aurora_instance" {
  count              = 2
  identifier         = "aurora-instance-${count.index}"
  cluster_identifier = aws_rds_cluster.aurora.id
  instance_class     = "db.r5.large"
  engine             = "aurora-mysql"
}

πŸ”Έ 15. Best Practices

βœ… Use Aurora Global DB for multi-region DR
βœ… Use Serverless for dev/test or variable workloads
βœ… Enable IAM + KMS + SSL
βœ… Set up CloudWatch alarms for failover/lag
βœ… Use Performance Insights to tune queries
βœ… Apply parameter groups for config tuning
βœ… Limit public access with proper SG rules
βœ… Store secrets in AWS Secrets Manager


πŸ”Έ 16. When to Use Aurora

Scenario Recommended
Need high availability and performance βœ… Aurora
Unpredictable workloads (auto-scaling) βœ… Serverless
Global app with multi-region reads βœ… Global DB
Full OS access required ❌ Use RDS Custom
Budget-conscious dev/test βœ… Aurora Serverless