Search⌘ K
AI Features

NoSQL & Key-Value Design

Explore how to design efficient NoSQL databases on AWS using DynamoDB. Understand access-pattern-first modeling, partition and sort keys, capacity modes, adaptive capacity, and global tables. Learn performance optimization techniques and consistency models to build scalable, resilient, and cost-effective data architectures that align with AWS best practices.

Modern distributed systems demand database architectures that scale horizontally without sacrificing latency, a requirement that traditional relational databases struggle to meet when workloads reach internet scale. Amazon DynamoDB represents the AWS-native answer to key-value and document workloads that require predictable single-digit millisecond performance, automatic multi-AZ durability, and zero operational overhead. Architects who approach DynamoDB with a relational mindset, normalizing data and expecting ad hoc joins, consistently produce throttled, expensive designs. The foundational principle throughout this lesson is access-pattern-first modeling: define how the application queries data, then structure tables, keys, and indexes to serve those patterns with minimal read and write overhead. This approach aligns with the AWS Well-Architected Framework pillars of performance efficiency, reliability, and operational excellence, making DynamoDB the preferred choice over self-managed NoSQL on EC2 whenever scalability and simplicity are architectural priorities.

DynamoDB serverless architecture mechanics

DynamoDB abstracts infrastructure management while distributing data across a fleet of storage nodes through automatic partitioning. When an item is written, DynamoDB applies an internal hash function to the partition keythe primary attribute DynamoDB uses to determine which physical storage partition holds an item, directly governing data distribution and throughput allocation. This hash determines which partition stores the item, and each partition supports up to 3,000 read capacity units (RCUs) and 1,000 write capacity units (WCUs).

Capacity modes and adaptive behavior

DynamoDB offers two capacity modes that address different traffic profiles:

  • Provisioned capacity with auto scaling adjusts throughput within configured minimum and maximum bounds, which is ideal for workloads with predictable daily patterns where cost optimization matters.

  • On-demand capacity eliminates capacity planning entirely by instantly accommodating traffic spikes. It uses per-request pricing, which suits unpredictable or new workloads without historical baselines.

...