A key-value store keeps an item under a unique key, much like a hash table. DynamoDB is a managed key-value store with document support: it persists items and organizes them into tables, such as separate tables for users and tasks. These are not relational tables queried with SQL; an application sends requests through the AWS SDK. section 12.0 section 12.1
Design keys around the data your application needs to retrieve. A key is usually the direct way to find an item, so choosing one without considering later lookups can cause difficulties. DynamoDB also provides secondary-index lookups and scans. For applications with heavy or uneven request traffic, its ability to scale is a reason to consider it—but an existing SQL application cannot simply switch databases without code changes. section 12.4 section 12.0
Users and tasks
A Node.js command-line to-do application can store users and tasks in separate DynamoDB tables. Its commands add and remove items, mark tasks done, and list tasks using filters. It integrates with DynamoDB through the AWS SDK rather than issuing SQL. section 12.1
An in-memory data store serves a different role when placed between an application and its primary database. In a game, Redis can hold a rapidly accessed leaderboard and cached player information while the relational database remains the primary store. Keeping that cached data fresh requires a caching strategy; DynamoDB Streams can supply table changes when populating a cache from DynamoDB. section 11.0 section 12.4







