Introduction to Amazon DynamoDB
Fully managed key-value and document NoSQL database with single-digit millisecond latency.
- 10 lessons
- Module quiz
Relational databases store data in tables with fixed columns and combine tables with joins at query time. This is flexible, but it becomes harder to keep fast and available as data and traffic grow very large. NoSQL databases take a different approach: they store data in a form designed around the application's known access patterns, so that each request can be answered quickly at any scale.
Amazon DynamoDB is AWS's serverless NoSQL database. It stores items, each identified by a primary key, as key-value pairs and JSON-like documents, and it returns them in single-digit milliseconds whether a table holds a thousand items or billions. There are no servers to provision or patch: DynamoDB replicates every table across three Availability Zones automatically, and the developer chooses only the table design and how capacity is paid for, either per request in on-demand mode or as provisioned read and write capacity units.
Where DynamoDB fits
DynamoDB is the default database for serverless applications on the exam and is tested in depth. Success with DynamoDB depends on designing the table from the queries the application will make, because a well-chosen key lets each request read only the items it needs, while a poorly chosen one forces slow and expensive scans. Questions commonly ask for capacity calculations, key and index design, and the correct API for a task, and they often combine DynamoDB with Lambda through DynamoDB Streams.
How this module is organised
Understanding Tables, Items and Attributes in Amazon DynamoDB introduces tables, items, attributes, data types, the core operations and read consistency. Designing Partition Keys and Sort Keys from Access Patterns and Querying on Other Attributes with Local and Global Secondary Indexes explain how tables and indexes are designed. Choosing a Capacity Mode and Calculating Read and Write Capacity Units explains the capacity modes and how to calculate read and write capacity. Reading and Writing Items with Queries, Batches, Conditions and Transactions covers the data operations, including conditional writes and transactions. Reacting to Table Changes with DynamoDB Streams explains how changes trigger processing, Expiring Items Automatically with Time to Live explains automatic expiry, and Caching DynamoDB Reads with DynamoDB Accelerator (DAX) explains in-memory caching. Working with DynamoDB Expressions, Errors and Local Tools in the SDKs covers the programming interfaces, and Restricting Access to Items and Attributes with Fine-Grained Access Control explains how IAM restricts users to their own items.
- Understanding Tables, Items and Attributes in Amazon DynamoDB Lesson 1
- Designing Partition Keys and Sort Keys from Access Patterns Lesson 2
- Querying on Other Attributes with Local and Global Secondary Indexes Lesson 3
- Choosing a Capacity Mode and Calculating Read and Write Capacity Units Lesson 4
- Reading and Writing Items with Queries, Batches, Conditions and Transactions Lesson 5
- Reacting to Table Changes with DynamoDB Streams Lesson 6
- Expiring Items Automatically with Time to Live Lesson 7
- Caching DynamoDB Reads with DynamoDB Accelerator (DAX) Lesson 8
- Working with DynamoDB Expressions, Errors and Local Tools in the SDKs Lesson 9
- Restricting Access to Items and Attributes with Fine-Grained Access Control Lesson 10
- Practise and review
- Test your knowledge 12 questions