• Pricing
© 2026 Serverless, Inc. All rights reserved.

Framework

  • Overview
  • Documentation
  • Plugins360
  • Pricing

Learn

  • Blog
  • GuidesUpdated
  • Examples240
  • Courses

Resources

  • Support
  • Security
  • Trust Center
  • Status

Community

  • Slack
  • GitHub47k
  • Forum
  • Meetups

Company

  • About
  • Careers
  • Contact
  • Partners

Legal

  • Terms of Service
  • Privacy Policy
  • Trademark
  • DMCA
Updated March 2026

The Ultimate Guide to
Amazon DynamoDB

Amazon DynamoDB is a fully managed NoSQL key-value database from AWS. It delivers single-digit millisecond performance at any scale, with automatic scaling, built-in replication, and zero server management.

Build with DynamoDBRead the Docs

Amazon DynamoDB Key Features

DynamoDB replaces traditional database infrastructure with a fully managed service that handles scaling, replication, and backups automatically.

Core

Key-Value & Document Store

Store and retrieve JSON objects using simple key-value access patterns. Support for partition keys, sort keys, and secondary indexes for flexible querying.

Performance

Single-Digit Millisecond Latency

Consistent, low-latency reads and writes at any scale. DynamoDB Accelerator (DAX) adds an in-memory cache layer for microsecond response times on hot data.

Events

DynamoDB Streams

Capture a time-ordered feed of item-level changes. Trigger Lambda functions on every insert, update, or delete for real-time automation and event-driven architectures.

Replication

Global Tables

Multi-region, multi-master replication with minimal configuration. Serve reads and writes from the closest region for lower latency and higher availability.

Reliability

Transactions & Consistency

ACID transactions across multiple items and tables. Choose between eventually consistent reads (default) and strongly consistent reads per query.

Operations

Automatic Scaling

On-demand mode scales instantly with no capacity planning. Provisioned mode supports auto-scaling policies that adjust read and write capacity based on load.

How DynamoDB Works

DynamoDB distributes your data across many machines automatically, providing high availability and horizontal scaling without any server management.

1

Store

You write items (JSON objects) to a table. Each item must include a primary key: either a single partition key, or a partition key combined with a sort key.

2

Distribute

DynamoDB hashes the partition key to spread data across many storage nodes. This ensures even distribution and consistent performance as your dataset grows.

3

Query

Retrieve items by primary key, scan with filters, or query secondary indexes. DynamoDB returns results in single-digit milliseconds regardless of table size.

AWS Service Integrations

DynamoDB integrates tightly with the broader AWS ecosystem:

AWS Lambda

Trigger functions on every table change via DynamoDB Streams. The most common pattern for serverless event-driven applications.

Amazon S3

Export table data to S3 for analytics, or store references to S3 objects in DynamoDB items for large binary data.

Amazon Cognito

Authenticate and authorize access to individual DynamoDB records using Cognito identity pools.

Amazon Redshift

Export DynamoDB data to Redshift for large-scale analytics and business intelligence workloads.

AWS AppSync

Use DynamoDB as a data source for GraphQL APIs with built-in resolvers and real-time subscriptions.

Amazon EventBridge

Pipe DynamoDB stream events into EventBridge for cross-service orchestration and event routing.

Using DynamoDB with the Serverless Framework

The Serverless Framework makes it straightforward to provision DynamoDB tables alongside your Lambda functions. Define tables in the resources section of your serverless.yml and wire up DynamoDB Streams as Lambda event sources:

serverless.yml
service: users-api

provider:
  name: aws
  runtime: nodejs22.x

functions:
  getUser:
    handler: handler.getUser
    events:
      - httpApi:
          path: /users/{id}
          method: get

  onUserChange:
    handler: handler.onUserChange
    events:
      - stream:
          type: dynamodb
          arn:
            Fn::GetAtt: [UsersTable, StreamArn]

resources:
  Resources:
    UsersTable:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: usersTable
        BillingMode: PAY_PER_REQUEST
        AttributeDefinitions:
          - AttributeName: id
            AttributeType: S
        KeySchema:
          - AttributeName: id
            KeyType: HASH
        StreamSpecification:
          StreamViewType: NEW_AND_OLD_IMAGES

Running serverless deploy creates the DynamoDB table, Lambda functions, IAM roles, and all necessary permissions in a single CloudFormation stack. The framework also supports provisioned capacity, Global Tables, and secondary indexes through standard CloudFormation syntax.

Benefits of DynamoDB

Fully Managed, Zero Maintenance

DynamoDB eliminates all operational database tasks. No servers to provision, no kernel patches to apply, no storage volumes to manage. AWS handles hardware provisioning, software patching, cluster scaling, and backups. Teams spend their time building features instead of maintaining infrastructure.

Seamless Auto-Scaling

In on-demand mode, DynamoDB scales read and write throughput instantly with no capacity planning. Tables handle sudden traffic spikes without throttling or manual intervention. Provisioned mode supports auto-scaling policies that adjust capacity based on utilization thresholds (20-90%), offering cost optimization for predictable workloads.

Multi-Region Replication

DynamoDB Global Tables provide multi-master, multi-region replication with minimal configuration. Reads and writes are served from the closest region, reducing latency for globally distributed users. Replication happens automatically with no ongoing maintenance required.

Event-Driven Integration

DynamoDB Streams capture every change to your table in real time. Combined with Lambda, this enables powerful automation: sending transactional emails, syncing data to search indexes, updating derived tables, running analytics pipelines, and implementing activity counters, all triggered automatically on every data change.

Trade-offs & Limitations

DynamoDB is an excellent fit for many serverless workloads, but these constraints are worth understanding before you commit.

Strong vendor lock-in

DynamoDB is proprietary to AWS with no open-source equivalent. Migrating to another database requires significant effort, and features like DynamoDB Streams have no direct counterpart outside AWS.

No JOIN operations

DynamoDB cannot join data across tables. If a single operation requires data from multiple tables, you must make separate requests and combine results in application code. This is slower and more expensive than a relational database for join-heavy workloads.

Cost grows with on-demand at scale

On-demand pricing is convenient for variable traffic, but costs increase quickly as average throughput grows. For steady, high-volume workloads, provisioned capacity with auto-scaling or reserved capacity is significantly cheaper.

400 KB item size limit

Individual items cannot exceed 400 KB. For images, documents, or other large objects, store the data in S3 and keep a reference in DynamoDB.

Limited caching options

DynamoDB has no built-in caching for hot-key access patterns. DynamoDB Accelerator (DAX) provides microsecond caching but is a separate, proprietary service with additional costs starting around $0.04/hour per node.

DynamoDB Pricing

DynamoDB offers two capacity modes: on-demand (pay per request) and provisioned (pay per hour for reserved throughput). Both include a generous free tier.

Free Tier (Always Free)

25 GB

Data storage

25 RCU

Read capacity units

25 WCU

Write capacity units

Plus 2.5M DynamoDB Streams read requests and 25 replication write units for Global Tables in two regions.

On-Demand Pricing

ResourcePrice (us-east-1)
Write request units$1.25 / 1M writes
Read request units$0.25 / 1M reads
Data storage$0.25 / GB-month (25 GB free)
Continuous backups (PITR)$0.20 / GB-month
On-demand backups$0.10 / GB-month
Global Tables replicated writes$1.875 / 1M writes
DynamoDB Streams reads$0.02 / 100K reads (2.5M free)

Provisioned Capacity Pricing

ResourcePrice (us-east-1)
Write capacity unit$0.00065 / hour per WCU
Read capacity unit$0.00013 / hour per RCU
Data storage$0.25 / GB-month (25 GB free)
Global Tables replicated WCU$0.000975 / hour per WCU

Example: 10,000 users, 10K reads + 5K writes each per month

100M reads x $0.25/1M = $2.50/month

50M writes x $1.25/1M = $6.25/month

105 GB storage (25 GB free) = $20/month

Continuous backup (105 GB) = $21/month

Total: ~$50/month (on-demand, single region)

Adding Global Tables roughly doubles costs to ~$90/month. DAX caching adds ~$100/month for a minimal cluster.

See the official DynamoDB pricing page for current regional rates and reserved capacity discounts.

When to Use DynamoDB

Use DynamoDB when your access patterns are well-defined, each operation works with self-contained items, you need single-digit millisecond latency at any scale, or you want a fully managed database that pairs naturally with Lambda and the broader serverless ecosystem.

Consider alternatives when your workload relies heavily on relational joins across tables (use Amazon RDS), you need full SQL query capabilities, or your data model is highly relational. For graph-shaped data with complex relationship traversals, consider Amazon Neptune. If you want an open-source NoSQL alternative with less vendor lock-in, evaluate MongoDB or Apache Cassandra.

DynamoDB Alternatives

DynamoDB is a strong default for serverless workloads on AWS, but other databases may be a better fit depending on your query patterns, hosting requirements, or data model.

Amazon RDS / Aurora

Best for workloads that require complex queries, JOINs across tables, and relational data modeling. Aurora offers MySQL and PostgreSQL compatibility with automatic scaling up to 128 TB.

MongoDB (Atlas)

A flexible document database with a rich query language and compound indexes. MongoDB Atlas offers managed hosting on AWS, GCP, and Azure, making it a strong choice for multi-cloud deployments.

Apache Cassandra

A distributed wide-column database designed for multi-datacenter replication with tunable consistency. Cassandra is cloud-agnostic and open source, avoiding vendor lock-in.

Google Cloud Bigtable

A wide-column store optimized for analytics, time-series data, and large-scale IoT workloads. Bigtable handles petabytes of data with low latency but offers limited query flexibility compared to DynamoDB.

Amazon Neptune

A managed graph database for workloads that involve complex relationship traversals, such as social networks, recommendation engines, and fraud detection.

Redis (ElastiCache)

An in-memory data store delivering sub-millisecond latency. Ideal for caching, session storage, leaderboards, and real-time analytics where persistence is secondary to speed.

DynamoDB Comparisons

How DynamoDB compares to other popular database options across key dimensions.

DynamoDB vs RDS

AspectDynamoDBRDS
TypeNoSQL key-value/documentRelational (SQL)
SchemaSchema-lessFixed schema
ScalingAutomatic, horizontalManual, vertical (read replicas for reads)
PricingPer request or provisioned capacityPer instance hour
JoinsNot supportedFull SQL JOIN support
TransactionsSupported (up to 100 items)Full ACID transactions
Best forHigh-scale, low-latency key-value lookupsComplex queries, relational data, reporting

DynamoDB vs MongoDB

AspectDynamoDBMongoDB
TypeManaged NoSQLSelf-hosted or Atlas (managed)
Query languagePartiQL (SQL-compatible) or APIMongoDB Query Language (MQL)
Secondary indexesGSI and LSI (limited)Flexible compound indexes
SchemaSchema-lessSchema-less with optional validation
HostingAWS onlyAny cloud or self-hosted
PricingPer request or provisionedInstance-based (Atlas) or self-managed
Best forServerless apps on AWSFlexible queries, multi-cloud

DynamoDB vs Cassandra

AspectDynamoDBCassandra
ManagementFully managedSelf-managed or DataStax Astra
Query languagePartiQL or APICQL (Cassandra Query Language)
ReplicationManaged Global TablesConfigurable replication factor
Vendor lock-inAWS onlyCloud-agnostic
PricingPer request or provisionedInfrastructure cost
Best forAWS serverless, zero-opsMulti-datacenter, tunable consistency

DynamoDB vs Google Cloud Bigtable

AspectDynamoDBCloud Bigtable
TypeKey-value and documentWide-column store
Query flexibilitySecondary indexes, PartiQLRow key scanning only
TriggersDynamoDB Streams + LambdaNo native triggers
PricingPer request or provisionedPer node hour ($0.65/hr)
Best forServerless apps, varied access patternsAnalytics, time-series, large-scale IoT

DynamoDB Limits

Key service limits to keep in mind when designing your DynamoDB data model. Some limits are adjustable through AWS support.

ResourceLimit
Item size400 KB max
Partition key length2,048 bytes max
Sort key length1,024 bytes max
Global secondary indexes (GSI) per table20 (adjustable)
Local secondary indexes (LSI) per table5 (cannot be changed after creation)
BatchWriteItem25 items per request
BatchGetItem100 items per request
TransactWriteItems / TransactGetItems100 items per transaction
Query or Scan result size1 MB per response (paginate for more)
Table sizeUnlimited
Tables per account per region2,500 (adjustable)

Learn More

Documentation

  • DynamoDB Streams Event Docs
  • CloudFormation Resources Guide
  • AWS Lambda Guide
  • AWS DynamoDB Developer Guide

Related Guides

  • Amazon API Gateway
  • Amazon CloudFront (CDN)
  • AWS AppSync (GraphQL)
  • Browse all guides

DynamoDB FAQ

Common questions about Amazon DynamoDB.

What is Amazon DynamoDB?
Amazon DynamoDB is a fully managed NoSQL key-value database service from AWS. It stores JSON objects in a simple key-value format, scales automatically, and requires no server management. DynamoDB is designed for applications that need consistent, single-digit millisecond latency at any scale.
Are DynamoDB writes atomic?
Yes, DynamoDB writes are atomic. All updates are applied in the order they are received. With Global Tables, concurrent writes to the same item in different regions could both succeed. For business-critical values, use DynamoDB Conditional Writes to guarantee single-writer semantics.
How much does DynamoDB cost?
DynamoDB offers two pricing models. On-demand pricing charges $1.25 per million writes and $0.25 per million reads. Provisioned capacity charges $0.00065 per write capacity unit per hour and $0.00013 per read capacity unit per hour. Storage costs $0.25 per GB-month after the first 25 GB free. The free tier includes 25 read/write capacity units and 25 GB of storage.
Does DynamoDB support joins?
No. DynamoDB cannot join data across multiple tables. If you need data from multiple tables for a single operation, you must make separate API requests and combine the results in your application code. For workloads that rely heavily on joins, consider Amazon RDS instead.
What is the maximum item size in DynamoDB?
The maximum DynamoDB item size is 400 KB. For larger data like images or binary files, the recommended approach is to store the data in Amazon S3 and keep a reference (S3 URI) in the DynamoDB item.
What are DynamoDB Streams?
DynamoDB Streams capture a time-ordered sequence of changes to items in a table. You can configure AWS Lambda functions to trigger on stream events, enabling automation like sending notifications, updating secondary data stores, or running analytics whenever data changes.
Does DynamoDB support transactions?
Yes. DynamoDB supports ACID transactions across multiple items and tables within a single AWS account and region. Transactions are disabled on Global Tables by default but can be enabled by contacting AWS support.
When should I use DynamoDB instead of RDS?
Use DynamoDB when each data object is relatively self-contained and your access patterns are well-defined. If a single item contains all the data needed for a given operation, DynamoDB excels. If your workload relies heavily on relational data, complex queries, or joins across tables, Amazon RDS is a better fit.
Can DynamoDB be placed in a VPC?
DynamoDB instances cannot be located inside a VPC directly. However, DynamoDB VPC Endpoints let you route all DynamoDB requests from your VPC through a single endpoint without traversing the public internet.
Does DynamoDB support SQL?
Yes. DynamoDB supports PartiQL, a SQL-compatible query language that lets you use familiar SELECT, INSERT, UPDATE, and DELETE statements. PartiQL works alongside the native DynamoDB API, so you can choose whichever approach fits your workflow. Note that PartiQL on DynamoDB does not support JOIN operations or subqueries.
Does DynamoDB have a schema?
No. DynamoDB does not enforce a fixed schema on your items. The only required attributes are the primary key (partition key and, optionally, a sort key). Beyond that, each item can contain any combination of attributes with different names and data types. This flexibility makes it easy to evolve your data model over time without migrations.
How does DynamoDB autoscaling work?
DynamoDB auto-scaling monitors your table throughput using Amazon CloudWatch alarms and adjusts provisioned read and write capacity automatically. You set a minimum, maximum, and target utilization percentage (20-90%). When traffic increases, capacity scales up within minutes. When traffic drops, capacity scales back down. In on-demand mode, scaling is instant and fully automatic with no configuration required.

Build Your First Serverless Database

Deploy a DynamoDB table with Lambda functions in minutes using the Serverless Framework.

Get Started FreeView Documentation