Amazon DynamoDB
Cloud service · AWS · Updated

Amazon DynamoDB

In short

Amazon DynamoDB is a fully managed NoSQL database service provided by Amazon Web Services (AWS) that offers fast and predictable performance with seamless scalability for applications that need consistent, single-digit millisecond latency at any scale.

Cloud Services Hub →

Free Amazon DynamoDB tools

13 key features of Amazon DynamoDB

Amazon DynamoDB offers a fully managed, scalable NoSQL database with seamless integration with AWS services, global data replication, event-driven programming, built-in security, high performance, enterprise-level transaction support, along with backup and adaptive capacity features.

01
Fully Managed NoSQL Database

Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.

02
Scalability

DynamoDB allows you to scale your databases up or down without downtime or performance degradation, accommodating for spikes in traffic and ensuring efficiency with provisioned and on-demand capacity modes.

03
Integrated with AWS

DynamoDB is deeply integrated with other AWS services, such as Lambda, Elastic MapReduce, Data Pipeline, and more, facilitating complex applications and workflows.

04
Global Tables

DynamoDB's Global Tables feature enables you to have fully replicated tables across different AWS regions, offering low-latency access to data for geographically distributed applications.

05
Event-Driven Programming

With DynamoDB Streams, you can enable event-driven programming and trigger AWS Lambda functions in response to data changes, which facilitates real-time processing and analytics.

06
Built-in Security

DynamoDB offers built-in security features such as encryption at rest, fine-grained access control using AWS IAM, and VPC Endpoints to keep data secure and regulate access.

07
High Performance and Durability

The service is designed for high performance with single-digit millisecond response times and built-in fault tolerance, replicating data across multiple zones for high availability and data durability.

08
Enterprise-Ready

DynamoDB supports ACID transactions, enabling multiple get and put operations across one or more tables in a single, atomic transaction, which is integral for enterprise-level applications requiring complex transactions.

09
Backup and Restore

DynamoDB allows you to easily create backups of your tables for archiving or restore your data to any point in time over the last 35 days, which helps in disaster recovery and compliance.

10
Adaptive Capacity

This feature automatically adjusts to your application’s traffic patterns to maintain steady and predictable performance, providing seamless handling of uneven workloads and hot keys.

11
Time to Live

Time to Live (TTL) automatically deletes items from a DynamoDB table after a specified duration.

12
Global Secondary Indexes

Global secondary indexes let applications query a table using partition and sort keys that differ from the table's own partition and sort keys.

13
Provisioned Capacity Auto Scaling

DynamoDB uses AWS Application Auto Scaling to dynamically adjust provisioned throughput capacity in response to traffic patterns.

Where Amazon DynamoDB is used

Amazon DynamoDB is utilized for a variety of use cases including gaming leaderboards, IoT data storage, web session storage, e-commerce shopping carts, and mobile backends, thanks to its high scalability, performance, and ease of management.

  1. 01
    Gaming Leaderboards

    Amazon DynamoDB is used for creating high-performance, scalable gaming leaderboards that can handle high throughput and massive storage needs for real-time player rankings.

  2. 02
    IoT Data Storage

    It serves as a repository for the vast amounts of data generated by IoT devices, providing fast, flexible, and reliable storage that can accommodate the rapid growth and unpredictable nature of IoT data streams.

  3. 03
    Session Storage for Web Applications

    DynamoDB offers a fast and stateless session storage solution for web applications, allowing for low-latency data access, seamless scalability, and simplified management of session data.

  4. 04
    E-commerce Shopping Carts

    Online retailers leverage DynamoDB to manage shopping cart data, ensuring quick response times and consistent performance during spikes in customer traffic or large-scale sales events.

  5. 05
    Mobile Backends

    Developers use DynamoDB to power the backend of mobile applications, taking advantage of its fully managed features, built-in security, and the ability to handle large volumes of low-latency data access requests.

How Amazon DynamoDB is priced

Amazon DynamoDB offers a range of pricing models including Provisioned Throughput, On-Demand Capacity, Reserved Capacity, Data Transfer, and charges for additional features like Streams and Global Tables.

Provisioned Throughput Pricing

This pricing model allows customers to specify the number of reads and writes per second that their application requires. Customers pay for the throughput they provision in terms of read capacity units (RCUs) and write capacity units (WCUs).

On-Demand Capacity Pricing

With on-demand capacity, there is no need to provision throughput in advance. Customers pay for the read and write requests they actually consume on a per-request basis.

Reserved Capacity Pricing

Customers can reserve capacity for their DynamoDB tables and benefit from significant savings over the standard provisioned throughput pricing. This option requires a one-time upfront payment for a term of one or three years, in exchange for a lower rate on the specified capacity during the term.

Data Transfer Pricing

Data transfer in AWS DynamoDB is free for incoming data and for data transfer between DynamoDB and other AWS services within the same region. Outgoing data transfers are charged beyond the free tier limit.

Additional Feature Pricing

DynamoDB charges for additional features such as DynamoDB Streams, backup and restore capabilities, and global tables. These features are priced separately from the capacity costs, based on the amount of data processed or stored.

Data Storage Pricing

Storage charges depend on the table class and the continuously measured size of the table. Billable size includes the raw data bytes and per-item storage overhead that depends on the enabled features.

Database Savings Plans

Database Savings Plans can reduce DynamoDB costs by up to 18% in exchange for committing to a consistent amount of usage over a one-year term.

Warm Throughput Pre-Warming Pricing

Proactively increasing warm throughput incurs a one-time fee at the regional rate of one RCU for each unit increase in read warm throughput and one WCU for each unit increase in write warm throughput. The charge applies to both Standard and Standard-IA tables.

Vector Search Pricing

Vector indexing and similarity search are charged separately from the underlying table. Vector writes are billed by GB written into the index, including projected non-vector attributes; searches are billed by GB processed and returned; vector index storage is billed per GB-month.

Change Data Capture Pricing

Change data capture to Amazon Kinesis Data Streams or AWS Glue is billed at one CDC unit for each write of up to 1 KB. Destination Kinesis Data Streams or AWS Glue charges also apply.

Amazon S3 Export Pricing

Full exports are charged by the size of the table data and local secondary indexes exported; incremental exports are charged by the data processed from PITR backups. Filtering has no additional charge. An export selecting a single partition key value with a key condition is charged on matched data, subject to a 10 MB minimum per export. S3 storage and PUT request charges also apply.

Amazon S3 Import Pricing

Imports from Amazon S3 are charged based on the uncompressed source file size. S3 storage and GET request charges also apply.

DynamoDB Accelerator Pricing

DynamoDB Accelerator (DAX) clusters incur hourly charges based on the nodes used; cache hits can offset part of this cost by reducing reads from DynamoDB tables.

Bulk Put Items Pricing

Bulk put items is billed by GB written to the table and its secondary indexes, with rates depending on the target table class and the Standard or Accelerated performance tier. Vector index writes are billed separately at the vector bulk put rate and support the Standard tier only. Billing has a 1 KB minimum per item, applied independently to the base table and each index write.

Services Amazon DynamoDB works with

AWS LambdaAWS Lambda

AWS Lambda allows you to run code in response to changes in your DynamoDB tables. You can configure triggers to run your Lambda functions whenever item-level changes in the table occur.

Amazon S3Amazon S3

Amazon DynamoDB can export table data to Amazon S3 for backup and archiving purposes. The integration also allows importing data from S3 into DynamoDB tables.

Amazon CloudWatchAmazon CloudWatch

Amazon CloudWatch monitors DynamoDB, providing metrics and logs for tables. You can set alarms based on thresholds for activities such as read/write capacity.

Amazon API GatewayAmazon API Gateway

DynamoDB can serve as the backend for API Gateway REST APIs through AWS service integrations. Request and response mappings let an API read or write table items without an intervening Lambda function.

Amazon AthenaAmazon Athena

DynamoDB tables can be queried with SQL through Athena's DynamoDB federated query connector. Queries can join DynamoDB records with data in other supported sources.

Amazon CloudSearchAmazon CloudSearch

DynamoDB tables can supply documents for a CloudSearch search domain through CloudSearch's DynamoDB data-loading workflow. This loads table data for indexing rather than continuously replicating subsequent changes.

Amazon CognitoAmazon Cognito

DynamoDB applications can use temporary AWS credentials issued through Cognito identity pools. IAM policies can restrict each authenticated user's access to particular tables, operations, or items identified by their partition keys.

Amazon DevOps GuruAmazon DevOps Guru

DynamoDB tables can be monitored by DevOps Guru for operational anomalies, such as unusual throttling or latency. Its insights correlate resource behavior and provide recommendations for investigating problems.

Amazon EMRAmazon EMR

DynamoDB tables can be read and written by Hive jobs on EMR using the DynamoDB connector. This supports bulk processing and transfers between DynamoDB and other data stores accessible to the cluster.

Amazon EventBridgeAmazon EventBridge

DynamoDB Streams can be used as an EventBridge Pipes source to filter, optionally enrich, and deliver item-change events to a target. Sending those events to an EventBridge event bus enables routing and fan-out to multiple consumers.

Amazon DynamoDB exam questions

Real practice exam questions on Amazon DynamoDB, with the correct answer and its explanation. Answer them with every option in the exam simulator.

CLF-C02

An online retailer needs to store shopping carts and retrieve each cart by its unique cart ID. Traffic varies sharply during promotions. The retailer wants a serverless NoSQL key-value database that provides single-digit millisecond performance without requiring database instance management. Which solution best meets these requirements?

Show answerCORRECT ANSWER

Amazon DynamoDB with on-demand capacity

Amazon DynamoDB is a serverless NoSQL database that supports key-value access and single-digit millisecond performance. On-demand capacity automatically accommodates changing request traffic without requiring database instance management or provisioned throughput planning.

MLA-C02 (beta)

A company ingests training observations into an Amazon DynamoDB table in provisioned capacity mode. Each observation creates one new item of 2.4 KiB by using a nontransactional write. The table has no secondary indexes, and writes are evenly distributed across partition keys.

An upcoming scheduled data collection event will increase ingestion from 200 to 2,000 observations per second almost immediately and sustain that rate for 30 minutes. The table currently has 1,000 provisioned write capacity units (WCUs). The ML engineer must prepare capacity before the event so that peak ingestion consumes no more than 75% of provisioned write capacity, without relying on burst capacity or reactive scaling. Applicable service quotas allow the required increase.

Which capacity plan meets these requirements with the least provisioned write capacity during the event?

Show answerCORRECT ANSWER

Increase the table to 8,000 WCUs before the event and return it to its normal capacity afterward.

DynamoDB rounds each 2.4-KiB item up to 3 KiB for write capacity calculations, so peak ingestion requires 2,000 × 3 = 6,000 WCUs. To keep utilization at or below 75%, the table needs at least 6,000 / 0.75 = 8,000 provisioned WCUs. Increasing capacity before the event avoids dependence on reactive scaling.

SAP-C03

A sports media company stores immutable match summaries in Amazon DynamoDB. An API running across multiple Availability Zones serves the summaries through a shared Amazon ElastiCache for Valkey cache. Each newly published summary receives thousands of reads within seconds. The first reads after publication currently miss the cache and cause a spike in DynamoDB read traffic.

Each publication request includes a unique summary ID and an immutable payload. Publishers retry timed-out requests with the same ID and payload. A notification service starts directing readers to a summary only after the publication API returns success. The company can accept increased publication latency, but a successful publication must mean that the summary is durably stored and already available in the cache. Cache entries might expire or be evicted later, so reads must still support cache misses. The database and cache do not support a shared transaction.

Which implementation meets these requirements, including when a cache operation fails after a database write succeeds?

Show answerCORRECT ANSWER

Conditionally insert the summary into DynamoDB, then synchronously populate ElastiCache before returning success. If the cache operation fails, leave the request retryable. On retry, verify that an existing DynamoDB item has the same payload and attempt cache population again before returning success. Continue loading from DynamoDB on read misses.

This implements write-through caching in the application: persistence and cache population must both complete before publication succeeds. The stable summary ID supports idempotent retries, but an existing database item does not cause cache population to be skipped. A cache failure does not require rolling back the durable item. Cache-aside reads handle later expiration or eviction.

Practice Amazon DynamoDB in a full exam

Questions on Amazon DynamoDB in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Amazon DynamoDB

4 min read

Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. Built to address the limitations of traditional database systems, it offers developers the flexibility of storing and retrieving any amount of data and serving any level of request traffic. DynamoDB is designed to maintain high performance and efficiency even as it scales to accommodate immense datasets and high throughput. 

At the core of Amazon DynamoDB is its fully managed nature, which means users do not need to worry about operational tasks such as hardware or software provisioning, setup and configuration, replication, software patching, or cluster scaling. It has a minimal learning curve, enabling developers to start creating new database tables and begin storing data almost instantly. The management console or alternatively, the AWS CLI or SDK offers an intuitive interface for creating and interacting with these tables. 

DynamoDB local is a downloadable version of DynamoDB for developing and testing DynamoDB applications locally.

ExtendDB is an open source implementation of the DynamoDB API with pluggable storage backends. It lets applications use the DynamoDB programming model on laptops, in on-premises data centers, and at disconnected edge sites where the managed service is unavailable, without rewriting application code.

DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second, making it a suitable backbone for large-scale mobile, web, gaming, ad tech, IoT, and many other applications. It is designed for durability and fault tolerance, automatically replicating data across multiple AWS Availability Zones to ensure reliability and safety. 

For global tables, multi-Region strong consistency allows applications to read the same data from any Region and build zero recovery point objective applications.

Global table replicas can belong to a single AWS account or multiple AWS accounts, with at most one replica table per AWS Region.

One of the noteworthy features of Amazon DynamoDB is its flexible data model. It supports key-value and document data structures, meaning one can use the same service for different applications as needs evolve. Keys identify items, and these items can have one or more attributes, making it a great fit for a variety of data models. DynamoDB supports ACID (Atomicity, Consistency, Isolation, Durability) transactions. This brings a level of reliability to applications that require complete and total accuracy for every transaction. In addition to ACID transactions, it provides consistent, single-digit millisecond response times at any scale. It means applications remain responsive at all times, providing a smooth and predictable user experience. 

Bulk put items writes data from Amazon S3 directly into an existing DynamoDB table as a managed, asynchronous operation without consuming the table's read or write capacity.

DynamoDB vector search adds vector indexing and similarity search to tables for retrieval-augmented generation and agentic AI applications without a separate vector database. It is available only in on-demand capacity mode and supports both Standard and Standard-IA table classes.

DynamoDB Accelerator (DAX) is a caching service that provides sub-millisecond response times for read operations.

Another important aspect is the DynamoDB Streams feature, which captures any changes to the items in the tables. The stream data can be used for various needs, such as triggering workflows or alerts when data changes or replicating data across tables or even outside of DynamoDB. 

Cost is another realm where DynamoDB presents its strengths. It offers a pay-per-use model with no upfront costs or long-term commitments, which can be a cost-effective option for startups and large enterprises alike. On-demand capacity or provisioned throughput modes are available to control costs while managing performance. 

Warm throughput is the number of read and write operations a table can instantaneously support. Tables and secondary indexes have warm throughput values by default, and those values automatically adjust as provisioned throughput or on-demand consumption increases.

Provisioned capacity is subject to regional account quotas and per-table quotas. Quota increases can be requested through AWS Support, but obtaining an increase is not instantaneous.

DynamoDB also offers two table classes: Standard, the default and recommended choice for most workloads, and Standard-Infrequent Access (Standard-IA), suited to infrequently accessed data where storage is the dominant cost. Both classes offer similar performance.

All in all, Amazon DynamoDB's integration with other AWS services, its high availability and durable nature, its security features, including encryption at rest, and its ease of use have established it as a critical component in the ecosystem of web and mobile applications, where performance and scalability are necessary to handle massive scale and rapid growth.

Learn Amazon DynamoDB in lessons

27 short lessons on Amazon DynamoDB in 8 certification courses.

and 21 more lessons

Open the lessons

Concepts related to Amazon DynamoDB

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.