RDS vs Aurora vs DynamoDB — When to Choose
Fast recall
Quick revision
Core answer
Database selection judgment and understanding of relational vs NoSQL trade-offs
Choosing DynamoDB because it's 'scalable' without understanding that it requires upfront access pattern design and sacrifices query flexibility
Mention Aurora Serverless v2 for variable-traffic apps and DynamoDB Streams for event-driven patterns that integrate with Lambda
Interview-ready guide
Interview answer
AWS offers three primary managed database options for Java backend services — RDS, Aurora, and DynamoDB — and the right choice depends on whether you need relational semantics, operational simplicity, or scale-first design.
RDS — standard relational, full Hibernate support
- RDS runs managed PostgreSQL, MySQL, Oracle, or SQL Server — which means Spring Data JPA, Hibernate, and JDBC work without any code changes; you choose the engine version and instance size, and AWS handles backups, patching, and failover
- The limitation: RDS scales vertically — when you need more capacity, you move to a larger instance class; there's a ceiling, and the migration requires a brief downtime
Aurora — relational with cloud-native storage
- Aurora separates compute from storage — the storage layer replicates across six copies in three Availability Zones automatically, which means a storage node failure doesn't cause data loss and read replicas can be added with no additional storage cost
- Aurora PostgreSQL is compatible with PostgreSQL, so Spring Data JPA and Hibernate work identically; the difference is Aurora's storage auto-scales from 10GB to 128TB and multi-master configurations allow write scaling
- Aurora Serverless v2 scales compute capacity in fine-grained increments between a minimum and maximum — which means you pay for what you use and idle services scale close to zero
DynamoDB — key-value, single-digit millisecond at any scale
- DynamoDB is a NoSQL key-value and document store that handles any amount of traffic by partitioning data horizontally — you define a partition key and optionally a sort key; queries are limited to the key structure
- Spring Data DynamoDB or the Enhanced DynamoDB Client maps Java objects to DynamoDB items; there's no JPA, no SQL, and no joins — cross-entity queries require pre-computed indexes (GSI) or denormalized data
- Choose DynamoDB when: workloads are simple key lookups or range scans on the primary key, traffic is highly variable, or the dataset is too large for a relational engine
RDS vs Aurora vs DynamoDB — When to Choose
Direct Answer
Choose RDS for standard relational workloads with Spring Data JPA, Aurora for relational workloads that need higher performance, global distribution, or serverless auto-scaling, and DynamoDB for high-scale key-value or document access patterns where you can design around a single-table model.
Common Mistakes & Pitfalls
Choosing DynamoDB because it's 'scalable' without understanding that it requires upfront access pattern design and sacrifices query flexibility
Check your understanding
Answer these without looking back at the article.
- How do you configure Spring Boot to connect to an RDS instance in a private VPC subnet?
- What is Aurora Serverless v2 and when is it cost-effective?
- How do you handle DynamoDB access patterns in a Spring Boot application using the Enhanced Client?
Related interview prep categories
1Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.