Estimate storage costs for an Amazon DynamoDB table - AWS Prescriptive Guidance

Estimate storage costs for an Amazon DynamoDB table

Created by Moinul Al-Mamun

Environment: PoC or pilot

Technologies: Databases; Big data; Cost management; Storage & backup

AWS services: Amazon DynamoDB

Summary

Amazon DynamoDB is a NoSQL transactional database that provides single-digit millisecond latency even at petabytes scale. This Amazon Web Services (AWS) serverless offering is getting popular because of its consistent performance and scalability. You do not need to provision storage. Your single table can grow up to petabytes. 

DynamoDB monitors the size of your table continuously throughout the month to determine your storage charges. AWS then charges you for the average size of storage in gigabytes. The more that your table grows over time, the more that your storage cost will grow. To calculate storage cost, you can use AWS Pricing Calculator, but you need to provide the approximate size of your table, including global secondary indexes (GSIs), which is really difficult to estimate at the beginning of the project. Also, AWS Pricing Calculator does not consider the data growth rate.

This pattern provides a mechanism and a reusable Microsoft Excel template to calculate DynamoDB storage size and cost. It considers the storage requirements for the base table and the GSIs independently. It calculates storage size by considering the size of your individual items and data growth rate over time. 

To get an estimate, insert two pieces of information into the template:

  • The individual item size in kilobytes for the base table and GSIs

  • How many new objects or products could be added to the table, on average, in a month, (for example, 10 million)

The template will generate a storage and cost forecasting graph for the next three years, which is shown in the following example.

Lower line for cost moves up slowly and the higher line for storage moves up more quickly.

Prerequisites and limitations

Prerequisites 

  • Basic knowledge of DynamoDB, and DynamoDB storage and pricing

  • Knowledge of your data, data model, and item size in DynamoDB

  • Knowledge of DynamoDB global secondary indexes (GSIs)

Limitations 

  • The template provides you with an approximate calculation, but it isn’t appropriate for all configurations. To get a more accurate estimate, you must measure the individual item size for each item in the base table and GSIs. 

  • This pattern supports estimating only storage size and cost for the next few years based on fixed data growth assumptions.

Tools

AWS services

  • Amazon DynamoDB is a fully managed NoSQL database service that provides fast, predictable, and scalable performance.

Other tools

  • AWS Pricing Calculator is a web-based planning tool that you can use to create estimates for your AWS use cases.

Epics

TaskDescriptionSkills required
Get item size.
  1. Check how many different types of item you are going to store in your table.

  2. To calculate the size of each item in kilobytes add the Key and Value size of each attribute.

  3. Calculate item size for a base table and for each GSI.

Data engineer
Get the number of objects added in a month.

Estimate how many components, or objects, will be added into the DynamoDB table, on average, in one month.

Data engineer
TaskDescriptionSkills required
Download Excel sheet from the attached document, and adjust it for your use case table.
  1. Download the Excel template.

  2. Adjust the business module and GSIs, based on your table design.

Data engineer
Enter information in the Excel template.
  1. Update item information into the sheet.

  2. Adjust the object numbers: How much could be added into the table each month?

  3. Update the storage price per GB-month for your AWS Region.

Data engineer

Related resources

Additional information

Note that the attached template forecasts only storage size and cost for Standard storage table class. Based on the forecast for storage costs, and considering individual item size and product or object growth rate, you can estimate the following:

  • Data export cost

  • Backup and recovery cost

  • Data storage requirements.

Amazon DynamoDB data storage cost

DynamoDB monitors the size of your tables continuously to determine your storage charges. DynamoDB measures the size of your billable data by adding the raw byte size of your data plus a per-item storage overhead that depends on the features you have enabled. For more information, see the DynamoDB Developer Guide

The price for data storage depends on your table class. The first 25 GB stored each month is free if you’re using the DynamoDB Standard table class. For more information about storage costs for Standard table class and Standard-Infrequent Access table class in different AWS Regions, see Pricing for On-Demand Capacity.

Attachments

To access additional content that is associated with this document, unzip the following file: attachment.zip