Amazon DynamoDB
Amazon DynamoDB
Overview
Amazon DynamoDB is a fully managed NoSQL (key-value/document) database delivering consistent millisecond (and in some cases microsecond) response at any scale. No server provisioning, patching, or replication to manage — it automatically replicates across multiple AZs. Traffic scales flexibly. Widely used as the backend for serverless applications and high-throughput, low-latency workloads.
Key Concepts
Key Design and Partitions
Every table requires a partition key (mandatory) and optionally a sort key as the primary key. Data is distributed internally by partition key hash, so avoiding hot partitions — where access concentrates on a few keys — is critical for throughput and performance. Queries are key-based by design, requiring different data modeling than relational databases.
Secondary Indexes
Global Secondary Indexes (GSI) support queries on a different partition/sort key combination, enabling cross-partition searches. Local Secondary Indexes (LSI) use the same partition key with a different sort key. Identify access patterns upfront and design indexes to match — this is fundamental DynamoDB design practice.
Capacity Modes
Provisioned mode sets read/write capacity units in advance for predictable, stable workloads — Auto Scaling adjusts within bounds. On-Demand mode charges per request and automatically accommodates any traffic level — ideal for unpredictable or bursty patterns.
Global Tables and Streams
Global Tables replicate across multiple regions multi-actively — read and write locally in each region for global low-latency and disaster recovery. DynamoDB Streams publish a time-ordered change log of table modifications; combine with Lambda for change-driven processing and cross-system integration.
TTL and DAX
TTL (Time To Live) automatically deletes items past a specified timestamp — useful for session cleanup and temporary data management. DynamoDB Accelerator (DAX) is an in-memory cache that reduces read latency to microseconds for read-heavy workloads.
Typical Use Cases
- Low-latency data layer at any scale for serverless application backends
- High-frequency key-value data: session management, user profiles, shopping carts
- Absorb unpredictable, rapidly growing IoT or gaming traffic with on-demand capacity
- Multi-region deployment with Global Tables for local low latency and regional DR
- Change-driven processing and cross-system integration with Streams + Lambda
Exam Relevance
DynamoDB is the go-to NoSQL service tested in SAA and DVA. 'Consistent millisecond response,' 'any scale,' 'serverless,' 'key-value or document' → DynamoDB is usually the answer; complex joins or heavy transactions → RDS/Aurora. DVA tests key design (avoid hot partitions), GSI vs. LSI trade-offs, strong vs. eventual consistency reads, TTL, and DAX for read acceleration. SAA tests on-demand vs. provisioned cost decisions and Global Tables for multi-region. Streams + Lambda event-driven fan-out is also a frequent pattern.
Related Services
References
Last updated: 2026-06-24
This page is created from AWS official documentation and reviewed/edited by the operator. See our editorial & quality policy for details.