Arkinu
AWS service comparison

Amazon DynamoDB vs Amazon RDS: differences and when to use each

Amazon DynamoDB
Amazon RDS

Often confused on the examQuestions tend to offer one as a distractor for the other: look for the phrase in the scenario that tips the balance.

Database

Amazon DynamoDB

Serverless, fully managed NoSQL database with key-value and document data models, delivering single-digit millisecond performance at any scale. It handles operational workloads that need consistent performance without managing servers or the complexity of scaling a relational database.

Exam phrases that point here

  • «single-digit millisecond latency at any scale»

    DynamoDB is a serverless NoSQL key-value and document database, designed to respond in single-digit milliseconds even as traffic and data grow.

    When not: If the scenario requires joins between tables, complex SQL queries, or referential integrity, it points to a relational database such as Amazon RDS or Amazon Aurora. And if it asks for microseconds, the clue is DAX in front of DynamoDB.

  • «unpredictable traffic and you do not want to plan capacity»

    On-demand capacity mode charges per request and adjusts to traffic on its own, without having to estimate reads and writes per second.

    When not: If traffic is steady and can be forecast, provisioned mode fits (normally with auto scaling), which gives more predictable costs. And if the application needs SQL, a serverless relational option such as Amazon Aurora Serverless is a better fit.

  • «microsecond response times for reads on a DynamoDB table»

    DynamoDB Accelerator (DAX) is an in-memory cache compatible with the DynamoDB API: it brings reads down from milliseconds to microseconds with minimal changes to the application.

    When not: DAX is not suitable if the application needs strongly consistent reads, nor is it a good fit for write-heavy workloads. If the source database is relational, the cache to think of is Amazon ElastiCache.

  • «run code automatically every time an item in the table changes»

    DynamoDB Streams records every insert, update, or delete in order, and an AWS Lambda function can be triggered with those records.

    When not: The stream keeps changes for only 24 hours. If you need longer retention, more consumers, or integration with other streaming tools, Kinesis Data Streams for DynamoDB fits. If events come from many different services, think of Amazon EventBridge.

  • «local reads and writes in multiple Regions, active-active»

    Global tables replicate the table in the Regions you choose and all of them accept reads and writes; there is no primary Region.

    When not: If the database is relational, the answer is usually Amazon Aurora Global Database, which writes in a primary Region. If the application uses Cassandra, Amazon Keyspaces offers multi-Region replication.

  • «automatically delete expired items without consuming write capacity»

    Time to Live (TTL) deletes each item when the timestamp it stores expires, without using write capacity. It is useful for sessions, temporary data, or records that lose value.

    When not: If the goal is to keep sessions in memory with sub-millisecond latency, Amazon ElastiCache also fits. If you are dealing with objects in S3, age-based deletion is done with S3 lifecycle rules, not TTL.

Often paired with

  • AWS Lambda
Study Amazon DynamoDB →

Database

Amazon RDS

Managed relational database service with popular engines such as MySQL, PostgreSQL, MariaDB, Oracle Database, Microsoft SQL Server, and IBM Db2. AWS handles administration tasks such as backups, software patching, and failure detection and recovery.

Exam phrases that point here

  • «managed relational database with the least operational overhead»

    Amazon RDS handles provisioning, patching, backups, and failover for engines such as MySQL, PostgreSQL, MariaDB, Oracle, or SQL Server, without you managing the operating system.

    When not: If the scenario requires access to the operating system or an engine configuration that RDS does not allow, the option is to install the database on EC2. If it asks for high performance and storage replicated across 3 AZs with MySQL/PostgreSQL compatibility, also think of Amazon Aurora.

  • «high availability with automatic failover to another Availability Zone»

    A Multi-AZ deployment keeps a synchronous standby in another AZ and RDS automatically fails over to it if the primary or its zone fails.

    When not: Multi-AZ does not distribute reads: the standby of a Multi-AZ DB instance deployment does not serve traffic. If you also need to protect against the failure of an entire Region, you need a replica in another Region (or Aurora Global Database).

  • «offload read queries from the primary database»

    Read replicas receive an asynchronous copy of the changes and serve read-only queries, such as reports, to relieve the primary instance.

    When not: The replica can lag, so it does not work when a read must immediately see what was just written. And if the problem is that the same queries are repeated, a cache such as Amazon ElastiCache may be a better answer.

  • «copy of the database in another Region for disaster recovery»

    RDS lets you create read replicas in another Region; in a disaster, the replica is promoted to a standalone read/write instance.

    When not: Replication is asynchronous and promotion is manual, so the most recent writes can be lost. If the scenario asks for an RPO of seconds and fast recovery at global scale, it points more to Aurora Global Database; if restoring backups is enough, to copying snapshots or backups to another Region.

  • «many Lambda functions open too many database connections»

    RDS Proxy pools and reuses connections, so thousands of invocations do not exhaust the engine's connections; in addition, Lambda can authenticate with its IAM role.

    When not: If the application cannot tolerate the extra latency the proxy adds or has no connection problems, it connects directly. And if the bottleneck is reads, the solution is replicas or a cache, not a proxy.

Study Amazon RDS →