Database Engine Selection
Key concepts
RDS vs Aurora costs
Open source vs commercial
License included vs BYOL
Multi-AZ cost impact
Read replica costs
Overview
Selecting the right database engine is one of the most important cost optimization decisions in AWS architecture. The choice affects not only the base instance cost but also licensing fees, Multi-AZ deployment costs, read replica pricing, and long-term operational expenses. Understanding the cost implications of each engine helps you design cost-effective database solutions.
Engine Selection Impact
Database engine selection can result in cost differences of up to 80% for the same instance size. Open-source engines (MySQL, PostgreSQL, MariaDB) are significantly cheaper than commercial engines (Oracle, SQL Server). Aurora offers premium performance but at a higher price point than standard RDS. Always match the engine to your workload requirements and budget constraints.
When exam questions ask about cost-effective database solutions, open-source engines (MySQL, PostgreSQL, MariaDB) are typically the answer unless specific Oracle or SQL Server features are required. Aurora is the answer when high performance AND cost optimization are both required.
Key Concepts
Database Engine Cost Hierarchy

Open-Source Engines
MySQL, PostgreSQL, MariaDB
- Lowest cost tier in RDS
- No licensing fees included
- Similar pricing across all three engines
- PostgreSQL slightly higher for larger instances
- Best for: Cost-conscious workloads, web applications, general-purpose databases
Typical On-Demand Pricing (db.r5.xlarge):
- MySQL: ~$0.48/hour
- PostgreSQL: ~$0.48/hour
- MariaDB: ~$0.48/hour
Commercial Engines
Oracle and SQL Server
- Highest cost tier in RDS
- License cost included in instance price
- Can be 80%+ more expensive than open-source
- BYOL option available to reduce costs
- Best for: Applications requiring specific Oracle/SQL Server features
Typical On-Demand Pricing (db.r5.xlarge):
- SQL Server Standard: ~$2.50/hour
- Oracle Standard: ~$1.50/hour (License Included)
- Oracle BYOL: ~$0.48/hour (same as open-source)
Amazon Aurora
Aurora MySQL and Aurora PostgreSQL
- 10-20% higher than standard RDS MySQL/PostgreSQL
- Superior performance (5x MySQL, 3x PostgreSQL throughput)
- Built-in high availability (Multi-AZ by default)
- Storage charged per GB-month plus I/O operations
- Best for: High-performance OLTP, enterprise workloads
Cost Components:
- Instance hours (compute)
- Storage (per GB-month)
- I/O requests (per million)
- Backup storage (beyond free tier)
RDS vs Aurora Cost Comparison
RDS vs Aurora Cost Factors
| Factor | Standard RDS | Aurora |
|---|---|---|
| Instance Cost | Base price for engine | 10-20% higher than RDS |
| Storage | Provisioned (gp2/gp3/io1) | Pay per GB used (auto-scaling) |
| I/O Costs | Included in storage | Charged per million I/Os |
| Multi-AZ | 2x cost (separate standby) | Included (replicated storage) |
| Read Replicas | Full instance cost each | Share storage (lower cost) |
| Failover Time | 60-120 seconds | Usually < 30 seconds |
| Best For | Predictable, steady workloads | High-performance, variable workloads |
License Models

License Included
License Included Model
- License cost bundled into hourly rate
- No license management required
- Higher hourly cost but simpler
- Available for: Oracle, SQL Server
When to Use:
- No existing licenses
- Want simplified management
- Short-term or variable workloads
- Don't want to track license compliance
Bring Your Own License (BYOL)
BYOL Model
- Use existing Oracle licenses on RDS
- Reduces cost to open-source levels
- Requires Oracle License Mobility
- Must track license compliance yourself
When to Use:
- Have unused Oracle licenses
- Enterprise Agreement with Oracle
- Long-term, stable workloads
- Cost reduction is priority
Free Tier Available:
- Oracle BYOL: db.t3.micro eligible
- SQL Server Express: db.t2.micro eligible
Multi-AZ Cost Impact
Multi-AZ Cost Comparison by Engine
| Engine | Single-AZ | Multi-AZ | Cost Increase |
|---|---|---|---|
| MySQL | $0.48/hr | $0.96/hr | 2x (100%) |
| PostgreSQL | $0.48/hr | $0.96/hr | 2x (100%) |
| SQL Server | $2.50/hr | $5.00/hr | 2x (100%) |
| Aurora | $0.58/hr | Built-in | 0% (included) |
| Oracle (License Included) | $1.50/hr | $3.00/hr | 2x (100%) |
Aurora Multi-AZ Advantage
Aurora includes Multi-AZ replication by default at no extra compute cost. Data is automatically replicated across three Availability Zones. For standard RDS engines, enabling Multi-AZ doubles your instance costs.
Read Replica Costs
Read Replica Pricing
Standard RDS Read Replicas:
- Billed as separate DB instances
- Same price as primary instance (if same size)
- No data transfer charges within same Region
- Cross-Region replicas: $0.02/GB data transfer
Aurora Read Replicas:
- Share underlying storage with primary
- Only pay for compute (instance hours)
- Storage not duplicated = significant savings
- Up to 15 replicas with millisecond lag
Read Replica Limits
| Engine | Max Replicas | Replication Lag | Cross-Region |
|---|---|---|---|
| Aurora MySQL | 15 | Milliseconds | Yes |
| Aurora PostgreSQL | 15 | Milliseconds | Yes |
| MySQL | 15 | Seconds to minutes | Yes |
| PostgreSQL | 15 | Seconds to minutes | Yes |
| MariaDB | 15 | Seconds to minutes | Yes |
| SQL Server | 15 | Seconds to minutes | Yes |
| Oracle | 5 | Seconds to minutes | Yes |
Engine Selection Decision Tree

Best Practices
Cost Optimization Strategies
-
Start with Open-Source: Default to MySQL, PostgreSQL, or MariaDB unless specific features require commercial engines
-
Consider Aurora for High Performance: When you need enterprise-grade performance, Aurora often provides better price-performance than scaling up standard RDS
-
Use BYOL When Possible: If you have existing Oracle licenses, BYOL reduces costs to open-source levels
-
Right-Size Before Multi-AZ: Enable Multi-AZ only for production workloads requiring high availability—it doubles costs for standard RDS
-
Leverage Reserved Instances: For stable workloads, Reserved Instances offer up to 66% savings on all engines
-
Evaluate Aurora vs Scaled RDS: Sometimes a smaller Aurora instance outperforms a larger RDS instance at lower cost
Migration Considerations
- Oracle to PostgreSQL: AWS Schema Conversion Tool (SCT) and DMS can help migrate
- SQL Server to MySQL/PostgreSQL: Significant application changes may be required
- MySQL to Aurora MySQL: Minimal changes, significant performance improvement
- PostgreSQL to Aurora PostgreSQL: Minimal changes, significant performance improvement
Common Exam Scenarios
Database Engine Selection Scenarios
| Scenario | Recommended Engine | Rationale |
|---|---|---|
| Cost-effective web application database | Aurora MySQL or RDS MySQL | Open-source, low cost, widely supported |
| Enterprise ERP requiring Oracle | RDS Oracle with BYOL | Use existing licenses to minimize cost |
| High-performance read-heavy workload | Aurora with Read Replicas | Shared storage reduces replica costs |
| Development/test environment | RDS MySQL or PostgreSQL | Lowest cost, no Multi-AZ needed |
| Mission-critical financial system | Aurora PostgreSQL Multi-AZ | High availability built-in |
| Legacy .NET application | RDS SQL Server | Required for SQL Server compatibility |
| Regulatory requirement for Oracle | RDS Oracle License Included | Compliance met with managed service |
| Variable traffic e-commerce site | Aurora Serverless v2 | Scales automatically, pay for use |
Common Pitfalls
Defaulting to Commercial Engines
Choosing Oracle or SQL Server without verifying the need adds 80%+ to database costs. Always validate that Oracle/SQL Server-specific features are truly required before selecting commercial engines.
Ignoring Aurora for Cost Optimization
While Aurora has higher per-instance costs, its shared storage model, built-in Multi-AZ, and efficient read replicas often result in lower total cost of ownership for enterprise workloads.
Over-Using Multi-AZ
Enabling Multi-AZ on all databases doubles costs for standard RDS engines. Reserve Multi-AZ for production workloads where high availability is critical. Development and test environments rarely need it.
Oversizing Read Replicas
Read replicas don't need to match the primary instance size. Size them based on actual read traffic requirements, which are often lower than write traffic needs.
Not Considering Total Cost of Ownership
Instance cost is just one factor. Consider storage, I/O, data transfer, backup storage, and operational overhead when comparing engines. Aurora's I/O charges can add up for I/O-intensive workloads.
Related Services
Quick Reference
Pricing Summary (db.r5.xlarge, US East, On-Demand)
| Engine | Single-AZ ($/hr) | Multi-AZ ($/hr) | Annual Cost (Single-AZ) |
|---|---|---|---|
| MySQL | $0.48 | $0.96 | ~$4,200 |
| PostgreSQL | $0.48 | $0.96 | ~$4,200 |
| MariaDB | $0.48 | $0.96 | ~$4,200 |
| Aurora MySQL | $0.58 | $0.58 | ~$5,100 |
| Oracle (LI) | $1.50 | $3.00 | ~$13,140 |
| Oracle (BYOL) | $0.48 | $0.96 | ~$4,200 |
| SQL Server SE | $2.50 | $5.00 | ~$21,900 |
Reserved Instance Savings
| Commitment | Payment Option | Savings |
|---|---|---|
| 1 Year | No Upfront | ~31% |
| 1 Year | Partial Upfront | ~38% |
| 1 Year | All Upfront | ~42% |
| 3 Year | No Upfront | ~43% |
| 3 Year | Partial Upfront | ~56% |
| 3 Year | All Upfront | ~66% |
Essential CLI Commands
# List available RDS engine versions
aws rds describe-db-engine-versions --engine mysql
# Get pricing information (requires pricing API)
aws pricing get-products --service-code AmazonRDS
# Describe DB instances with cost-relevant info
aws rds describe-db-instances \
--query "DBInstances[*].[DBInstanceIdentifier,Engine,DBInstanceClass,MultiAZ]"
Test Your Knowledge
A company wants to migrate from an on-premises Oracle database to AWS but needs to minimize costs. They have unused Oracle licenses with Software Assurance. Which approach is most cost-effective?
A solutions architect needs to choose a database for a new web application. The requirements are: lowest possible cost, high availability, and MySQL compatibility. Which option should they choose?
An organization is evaluating database options and needs read replicas for a read-heavy workload. Which statement about read replica costs is correct?
A company is running RDS SQL Server Standard Edition and wants to reduce database costs by 50% or more. Which approach would achieve this goal?