In one line: RDS is a library, DynamoDB is a locker hall, ElastiCache is a corner newsstand, and Redshift is a city archive.
AWS offers many databases, and beginners often pick one by name instead of by job. Picture a city with four buildings. Each one stores information, but each one is built for a different kind of visit.
RDS: the library
Amazon RDS runs relational databases such as MySQL, PostgreSQL, MariaDB, Oracle, and SQL Server. Data lives in tables with a defined structure, and you can connect tables with relationships and query them with SQL. AWS handles routine work like backups and patching, and you can add Multi-AZ for higher availability. Amazon Aurora, AWS's own MySQL- and PostgreSQL-compatible engine, belongs to this family too.
DynamoDB: the locker hall
Amazon DynamoDB is a fully managed, serverless NoSQL database. You hand over a key and get your item back quickly, even at very large scale. It does not support joins, so you design your tables around the questions your app will ask. That planning is the price of its speed and scale.
ElastiCache: the corner newsstand
Amazon ElastiCache keeps data in memory, so reads are very fast. It sits in front of your main database and holds the items people ask for again and again, which reduces the load on the database behind it. Treat it as a shortcut, not as the source of truth, because cached data can expire or be evicted.
Redshift: the city archive
Amazon Redshift is a data warehouse built for analytics. It is designed to run SQL queries over very large amounts of data to produce reports and insights. It is not meant for handling lots of small, quick transactions, which is the job of the library.
The trade-offs
- RDS: familiar structure and SQL, but scaling takes more planning
- DynamoDB: fast and scalable lookups by key, but you must know your access patterns up front
- ElastiCache: very fast reads, but the data is temporary
- Redshift: powerful analytics, but not built for everyday app transactions
Four questions to help you choose
- Does my data have clear structure and relationships, and do I need joins? Consider RDS.
- Will I mostly look items up by a key, at large scale? Consider DynamoDB.
- Am I reading the same data over and over and it feels slow? Consider adding ElastiCache.
- Do I need to analyze huge amounts of data for reports? Consider Redshift.
One database is not the whole city
Real systems often combine these. A common pattern is a relational database as the main store, a cache in front of it for popular reads, and a warehouse for reporting. If you are just starting, a relational database is a common and sensible place to begin.
Your turn
Which of these four did you try first, and what surprised you?
Loading article