Amazon DynamoDB

Amazon DynamoDB - Amazon DynamoDB is a fully managed NoSQL database service designed for fast and predictable performance with seamless scalability. It supports both document and key-value store models, making it versatile for a wide range of applications. DynamoDB automatically handles data replication across multiple regions, ensuring high availability and durability. It offers features like fine-grained access control, automated backups, and in-memory caching with DynamoDB Accelerator (DAX). With its serverless architecture, users can scale up or down without managing servers, making it ideal for applications requiring consistent, low-latency data access at any scale.

Key definitions for Amazon DynamoDB:

  • Key-value and document data models

    Amazon DynamoDB accommodates both key-value and document data models, offering a flexible schema that allows each item to possess diverse attributes. This adaptability means you can easily adjust to changing business needs without the hassle of redefining the table schema, as required by relational databases

  • Serverless that scales to zero

    Amazon DynamoDB eliminates the need to provision, patch, or manage servers and software. It operates without versioning or maintenance windows, ensuring zero downtime maintenance. The on-demand pricing model allows for pay-as-you-go flexibility, with automatic scaling that adjusts table capacity to maintain performance without requiring any administration

  • ACID transactions

    Amazon DynamoDB is optimized for mission-critical workloads, supporting atomicity, consistency, isolation, and durability (ACID) transactions necessary for complex business logic. It offers native, server-side transaction support, simplifying the process of making coordinated, all-or-nothing changes across multiple items and tables.

    Now, with support for up to 100 actions per transaction, DynamoDB enhances developer productivity. This capability enables developers to apply DynamoDB's scalability, performance, and enterprise-grade benefits to a broader range of mission-critical applications

  • Active-active replication with global tables

    Amazon DynamoDB global tables enable active-active data replication across your chosen AWS Regions with 99.999% availability. With multi-active functionality, you can write to and read from any replica, allowing globally distributed applications to access data locally and achieve single-digit millisecond read and write performance.

    Furthermore, global tables automatically scale capacity to support multi-Region workloads. They enhance the resilience of your application across regions and are an essential part of your organization's business continuity strategy

  • Amazon DynamoDB Streams as part of an event-driven architecture

    Amazon DynamoDB Streams is a change data capture feature that records every item-level change in a table, including creates, updates, and deletes, in a time-ordered sequence. This near-real-time recording is perfect for event-driven architecture applications to process and respond to these changes. All changes are filtered to remove duplicates and are kept for 24 hours.

    Applications can access this log to view data items as they appeared before and after modifications in near-real time. DynamoDB Streams ensures that each stream record appears exactly once and that records for each modified item are in the same sequence as the actual changes

  • Secondary indexes

    Like other database systems, you start by creating a table, which is a collection of items. In Amazon DynamoDB, each item has a primary key. Many applications can also benefit from having one or more secondary keys to search data more efficiently using other attributes. Amazon DynamoDB provides the option to create both global and local secondary indexes, allowing you to query data using a secondary or alternate key.

    Global secondary indexes, also known as sparse indexes, offer maximum flexibility in accessing your data. They enable you to provision lower write throughput while maintaining excellent performance at a reduced cost

  • Fine grained access control

    Amazon DynamoDB does not use usernames or passwords. Instead, it relies on AWS Identity and Access Management (IAM) for authentication and resource access. You can define IAM policies, resource-based policies, and conditions to provide fine-grained access control, limiting read or write permissions to specific items and attributes in a table based on user identity. This approach allows customers to implement security policies directly within their code

  • Encryption at rest

    Amazon DynamoDB encrypts all customer data at rest by default, enhancing security with encryption keys stored in AWS Key Management Service (AWS KMS). With the addition of the AWS Database Encryption SDK, you can implement attribute-level encryption for more granular access control within your table. This allows you to build security-sensitive applications that comply with strict encryption and regulatory requirements.

    Encryption keys offer an extra layer of defense, preventing unauthorized access to your underlying data storage. You can choose whether Amazon DynamoDB should use an AWS-owned key (the default encryption type), an AWS-managed key, or a customer-managed key to encrypt your data. The default encryption with AWS-owned KMS keys is provided at no additional charge

  • Point-in-time recovery

    Point-in-time recovery (PITR) protects your Amazon DynamoDB tables from accidental write or delete operations by providing continuous backups. You can restore your table to any specific moment within the last 35 days.

    PITR operates without using provisioned capacity and does not affect your applications' performance or availability. Enabling PITR or executing backup and restore operations is as simple as a single click in the AWS Management Console or a single API call

  • On-demand backup and restore

    On-demand backup and restore lets you create comprehensive backups of your Amazon DynamoDB table data for archival, helping you adhere to corporate and governmental regulations. You can back up tables from a few megabytes to hundreds of terabytes without affecting the performance or availability of your production applications. Additionally, with AWS Backup integration, you can copy on-demand backups across accounts and regions, use cost allocation tagging for backups, and transition backups to cold storage

  • Private network connectivity

    Amazon DynamoDB supports Gateway Virtual Private Cloud (VPC) endpoints and Interface VPC endpoints for connections within a VPC or from on-premises data centers. You can set up private network connectivity from your on-premises applications to DynamoDB using interface VPC endpoints enabled with AWS PrivateLink. This allows customers to streamline private connectivity to DynamoDB and maintain compliance

  • Read/write capacity modes

    Amazon DynamoDB provides two capacity options for tables: on-demand and provisioned.If your workload is unpredictable and you're not certain about the level of usage, the on-demand capacity mode manages the capacity for you, and you only pay for the resources you actually use. Conversely, with the provisioned capacity mode, you set the read and write capacity yourself. This option can be more cost-efficient if you expect consistent usage of the allocated capacity

  • Standard Infrequent Access (Standard-IA) table class

    For data that isn't accessed frequently, the Amazon DynamoDB Standard-IA table class offers a way to cut costs by up to 60%. Designed for long-term storage, Standard-IA tables are ideal for storing data like application logs, historical gaming records, or old social media posts. They maintain the same availability, durability, and performance as the Amazon DynamoDB Standard tables, which are the default and typically the most cost-efficient option for most use cases

  • Auto scaling for improved cost efficiencies

    For tables set to provisioned capacity, Amazon DynamoDB automatically adjusts throughput and storage according to your pre-defined capacity settings by tracking your application's performance.

    As your application's traffic increases, Amazon DynamoDB scales up throughput to meet the demand. Conversely, if traffic decreases, DynamoDB scales down, reducing costs by avoiding payment for unused capacity

  • Reserved capacity

    Reserved capacity lets you commit to a set amount of database capacity for either a one-year or three-year period, providing a significant discount compared to provisioned capacity rates for single-Region read and write units on Amazon DynamoDB Standard tables. If your application's read and write throughput is predictable, choosing reserved capacity can result in savings of up to 54% for a one-year term or up to 77% for a three-year term, compared to standard provisioned capacity rates

  • Free tier

    Free tier for DynamoDB provides 25GB of storage, along with 25 provisioned Write and 25 provisioned Read Capacity Units (WCU, RCU) which is enough to handle 200M requests per month

  • Amazon DynamoDB Accelerator

    Amazon DynamoDB Accelerator (DAX) is a caching service that works seamlessly with Amazon DynamoDB, offering accelerated read performance for your tables by utilizing a fully managed in-memory cache. With DAX, you can enhance the read speed of your DynamoDB tables by up to 10 times, reducing the time for reads from milliseconds to microseconds, even under the load of millions of requests per second

  • Bulk import/export from Amazon Simple Storage Service (S3)

    The bulk import/export feature from S3 simplifies the process of managing your data by removing the need to manually code for moving, transforming, and copying Amazon DynamoDB tables across different applications, accounts, or regions. This feature operates without consuming your table’s read or write capacity, so you don’t have to plan for or allocate extra capacity. Amazon DynamoDB fully manages the bulk import/export process.

    Bulk imports from S3 allow you to import data of any size, from megabytes to terabytes, using supported formats like CSV, Amazon DynamoDB JSON, and Amazon Ion. This can save you up to 66% compared to client-based writes using provisioned capacity.

    Bulk exports to S3 enable you to export data from tables with point-in-time recovery (PITR) enabled, letting you capture any moment from the past 35 days with per-second accuracy. Once the data is exported to Amazon S3, you can use other AWS services, such as Amazon Athena and Amazon SageMaker, to analyze the data and gain valuable insights

  • Advanced streaming applications with Kinesis Data Streams for Amazon DynamoDB

    Amazon Kinesis Data Streams for Amazon DynamoDB captures individual item changes in your DynamoDB tables to support live dashboards, create metrics, and send data to data lakes. Kinesis Data Streams allows you to develop sophisticated streaming applications, including real-time log aggregation, business analytics, and IoT data collection.

    Additionally, with Kinesis Data Streams, you can leverage Amazon Kinesis Data Firehose to automatically transfer DynamoDB data to other AWS services like Amazon S3, Amazon OpenSearch Service, and Amazon Redshift

  • Change tracking with triggers

    Amazon DynamoDB integrates with AWS Lambda to create triggers, enabling automatic execution of custom functions when item-level changes occur in a DynamoDB table. These triggers allow you to develop event-driven applications that respond to data updates in DynamoDB tables. The Lambda function can perform any action you choose, such as sending notifications or initiating workflows

  • Monitoring and diagnosing system performance with Amazon Cloudwatch

    Amazon DynamoDB integrates with Amazon CloudWatch to make it easier to monitor your database performance by gathering and processing raw performance data. With Amazon CloudWatch, you can design custom dashboards and views to track metrics and set alarms for your DynamoDB databases. This monitoring feature is provided by default at no additional cost, and you can configure alarms to automatically alert you based on specific metric conditions.

    Amazon CloudWatch Contributor Insights aids in swiftly identifying the factors affecting your database and application performance, allowing you to quickly isolate, diagnose, and resolve issues during operational events

Service integrates with:

Usage use cases

  • Software applications.

    Serverless Web Applications. DynamoDB can serve as the backend database for the application, storing user data, session information, and application state. It integrates seamlessly with AWS Lambda to trigger functions in response to changes in the database, enabling a fully serverless architecture

  • Media metadata stores.

    Enhance throughput and support greater concurrency for media and entertainment workloads, including live video streaming and interactive content, while minimizing latency through multi-Region replication across AWS Regions. Social Media and Content Management. DynamoDB can be used to manage user profiles, store content, and track interactions between users. It can also power news feeds and recommendation engines by quickly querying and aggregating data.

  • Seamless experience in retail.

    Leverage design patterns to implement shopping carts, workflow engines, inventory management, and customer profile systems. DynamoDB is capable of supporting high-traffic events at extreme scale, efficiently managing millions of queries per second

  • Scale gaming platforms.

    Real-Time Gaming Leaderboards. Amazon DynamoDB can store player scores and update them in real-time. With its ability to handle high-velocity reads and writes, DynamoDB ensures that the leaderboard is always up-to-date, even with millions of concurrent players

  • Fraud Detection and Prevention.

    DynamoDB can store transaction data and work with AWS Lambda and Amazon Kinesis Data Streams to analyze patterns and detect anomalies in real-time. Suspicious activities can trigger alerts or actions automatically

  • Mobile App Data Synchronization.

    DynamoDB can be used in conjunction with AWS AppSync to manage and synchronize data between the mobile app and the backend database. It ensures that users have consistent data across devices, even when offline

FAQ for Amazon DynamoDB

  • What is Amazon DynamoDB used for?

    In summary, Amazon DynamoDB is used for applications requiring fast, scalable, and reliable data storage and retrieval, making it a popular choice for modern, high-demand applications across various industries
  • Is Amazon DynamoDB the same as MongoDB?

    Amazon DynamoDB and MongoDB are both NoSQL databases, but they are not the same. DynamoDB is a fully managed, serverless key-value and document database service provided by AWS, designed for high scalability, performance, and integration within the AWS ecosystem. MongoDB, on the other hand, is an open-source document-oriented database known for its flexibility in handling diverse data structures, and it can be self-hosted or managed through a service like MongoDB Atlas. While both databases serve similar purposes in managing unstructured or semi-structured data, they differ in deployment, management, and feature sets
  • What is the difference between Amazon S3 and DynamoDB?

    Amazon S3 (Simple Storage Service) and Amazon DynamoDB are both AWS storage services, but they serve different purposes and use cases. Amazon S3 is an object storage service designed to store and retrieve large amounts of unstructured data, such as files, images, videos, backups, and logs, with high durability and scalability. It is ideal for storing any type of file-based data. In contrast, Amazon DynamoDB is a NoSQL database service designed for fast, scalable, and low-latency storage and retrieval of structured data, such as key-value pairs and JSON documents. While S3 is used for storing large objects and files, DynamoDB is used for managing structured data that requires quick access and querying capabilities
  • When should I use DynamoDB?

    You should use DynamoDB when you need a highly scalable, low-latency NoSQL database for applications that require fast and reliable access to structured data. It is ideal for scenarios such as real-time applications, high-traffic web and mobile apps, gaming leaderboards, IoT data management, and event-driven architectures. DynamoDB is especially suited for workloads that demand automatic scaling, high availability, and seamless integration with other AWS services
  • Is DynamoDB better than PostgreSQL?

    Whether DynamoDB is better than PostgreSQL depends on your specific use case. DynamoDB is a NoSQL database optimized for high scalability, low-latency access, and handling unstructured or semi-structured data, making it ideal for applications with large-scale, dynamic workloads like real-time processing, IoT, and mobile apps. PostgreSQL, on the other hand, is a relational database that offers strong ACID compliance, complex queries, and support for structured data with relationships, making it better suited for applications requiring complex transactions, data integrity, and advanced analytics. The choice between them depends on the nature of your data, the complexity of your queries, and your scalability needs
  • Can DynamoDB handle big data?

    Yes, DynamoDB can handle big data effectively. It is designed to scale automatically and manage large volumes of data with high throughput and low latency. DynamoDB can process millions of requests per second and store terabytes of data, making it well-suited for big data use cases such as real-time analytics, IoT data management, and large-scale web applications. Its serverless architecture allows it to scale horizontally, handling increasing data loads without manual intervention, making it a robust solution for big data scenarios