Amazon DynamoDB のアイコン

Amazon DynamoDB Essential2012年〜

A fully managed NoSQL database delivering single-digit millisecond latency

What It Does

Amazon DynamoDB is a fully managed NoSQL database that supports both key-value and document data models. It returns responses in single-digit milliseconds at any scale, with no server provisioning or patching required. In on-demand mode, you pay only for the requests you make with fully pay-per-use pricing.

Use Cases

It is ideal for workloads requiring low latency and high throughput, such as mobile app and game user data management, e-commerce shopping carts, IoT device data storage, and session management. The pattern of combining it with Lambda in serverless architectures is especially popular.

Everyday Analogy

Think of it like an ultra-fast library card system. Just provide the card number (partition key) and it instantly finds the right card among millions. The card format is flexible - you can add fields later without any issues.

What Is DynamoDB?

Amazon DynamoDB is a fully managed NoSQL database service from AWS. You simply create a table and start reading and writing data - no server management or capacity planning needed. Data is automatically replicated across three Availability Zones, achieving 99.999% availability.

Key Design and Data Model

DynamoDB tables are structured with a partition key and an optional sort key. The partition key determines where data is stored, and the sort key controls the ordering of data within the same partition. Since key design directly impacts performance, it is important to analyze your access patterns before choosing keys. Secondary indexes (GSI / LSI) enable queries on different keys.

Capacity Modes and Pricing

DynamoDB offers two pricing modes: on-demand and provisioned. On-demand mode charges per request and is suited for unpredictable traffic patterns. Provisioned mode requires specifying read and write capacity units in advance and is more cost-effective for steady traffic. Enabling Auto Scaling in provisioned mode allows automatic adjustment based on load. For case studies and practical guidance on capacity modes and pricing, specialized books (Amazon) are also a good reference.

Getting Started

Click 'Create table' in the DynamoDB console, specify a table name and partition key, and your table is created. You can immediately start reading and writing data using the AWS SDK or CLI. Enabling DynamoDB Streams lets you capture data changes in real time with Lambda functions, enabling event-driven architectures.

Things to Watch Out For

  • Partition key design directly impacts performance, so it is important to avoid hot partitions where access concentrates on specific keys
  • On-demand mode is convenient but can be more expensive than provisioned mode when handling large volumes of requests
  • The free tier includes 25 GB of storage and 250 million read/write requests per month, always free
共有するXB!