CLOUD / A CONCEPT NOTE

DynamoDB

serverless NoSQL database with single-digit millisecond latency

~85 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

DynamoDB is a fully managed key-value and document database. You define a table with a primary key (partition key + optional sort key), and DynamoDB automatically distributes data across partitions. It scales horizontally — throughput is provisioned or on-demand. It's the backbone of countless serverless architectures at Amazon.

02 / FOLLOW THE MECHANISM

How dynamodb serves a query

  1. Application

    calls GetItem with a primary key: { 'userId': 'user_abc123' }.

  2. DynamoDB

    hashes the partition key to determine which partition (physical storage node) holds the data.

  3. Partition

    retrieves the item from SSD storage within the partition and returns it.

  4. Consistency

    by default, reads are eventually consistent (1s replication lag). Strongly consistent reads cost more but return the latest data.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

inspect table metadata, indexes, and capacity

aws dynamodb describe-table --table-name my-table

EXAMPLE 02 · REFERENCE

scan all items (expensive on large tables)

aws dynamodb scan --table-name my-table

Explore command anatomy in the CLI lab