Amazon DynamoDB

It supports key-value and document data structures and is designed to handle a wide range of applications requiring scalability and performance.

When this became a bottleneck on engineering operations, services moved away from this direct access pattern in favor of public-facing APIs.

Many of Amazon's services demanded mostly primary-key reads on their data, and with speed a top priority, putting these pieces together was extremely taxing.

[6] Content with compromising storage efficiency, Amazon's response was Dynamo: a highly available key–value store built for internal use.

While these systems had noticeable design flaws, they did not demand the overhead of provisioning hardware and scaling and re-partitioning data.

[9][10][11] Additional patterns described in AWS documentation include "Event Sourcing", where data changes are stored as immutable events, enabling historical state reconstruction; "Materialized Views", which simplify analytical queries through pre-computed aggregations, often implemented via DynamoDB Streams, application-level processing, or periodic batch updates using Lambda functions; and "Time-Series Design", optimized for workloads like logging and metrics, typically using a partition key for entity identification and a sort key representing timestamps to efficiently query time-based datasets.

"Single Table Design" can optimize query efficiency by co-locating related data under the same partition key to reduce access latency.

"Materialized Views" simplify complex analytical queries through pre-aggregation strategies tailored to access patterns.

"Time-Series Design" uses partitioning and sorting strategies to efficiently store and query large volumes of temporal data.

[9][10][11][12][13][14] Amazon DynamoDB's claim of single-digit millisecond latency primarily applies to simple operations such as GetItem and PutItem, which retrieve or modify individual items using their primary keys.

This reflects the average latency under ideal conditions, such as even partition distribution and sufficient throughput provisioning, and does not account for transport overhead incurred during communication with the DynamoDB endpoint.

More complex operations, such as Query with filters, Scan, or those involving large datasets, may experience increased latency due to additional computation and data transfer requirements.

[15][16] To optimize DynamoDB performance, developers must carefully plan and analyze access patterns when designing their database schema.

[18] Amazon DynamoDB does not natively support join operations, as it is a NoSQL database optimized for single-table, high-performance access patterns.

These tools process DynamoDB data outside the database, allowing SQL-style joins for analytical and batch workloads.

While these methods expand DynamoDB's querying capabilities, they introduce additional complexity and latency, making them unsuitable for real-time or transactional use cases.

Application-level joins merge results programmatically from multiple queries, while single-table design pre-joins data during schema planning.

For analytical workloads, external tools like Amazon EMR and Athena enable SQL-style joins outside DynamoDB.

When combined with Time to Live (TTL), these attributes enable the automated removal of expired locks, potentially enhancing concurrency management in event-driven architectures.

To prevent data loss, DynamoDB features a two-tier backup system of replication and long-term storage.

DynamoDB periodically takes snapshots of these two data structures and stores them for a month in S3 so that engineers can perform point-in-time restores of their databases.

[30] Because indices result in substantial performance hits for write requests, DynamoDB allows a user at most five of them on any given table.

But the consistency-availability trade-off rears its head again here: in read-heavy systems, always reading from the leader can overwhelm a single node and reduce availability.

Web console
Web console
Creation table in DynamoDB