

# Estimate storage costs for an Amazon DynamoDB table
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table"></a>

*Moinul Al-Mamun, Amazon Web Services*

## Summary
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-summary"></a>

Amazon DynamoDB is a NoSQL transactional database that provides single-digit millisecond latency even at petabytes scale. This popular serverless offering from AWS provides consistent performance and scalability. You do not need to provision storage, and 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](https://calculator.aws/#/createCalculator/DynamoDB), 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 generates 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.\]](http://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/images/pattern-img/9b74399d-9655-47ee-b9b3-de46b65bc4e3/images/c0436252-cc42-4ea3-ac50-c0455aece39d.png)


 

## Prerequisites and limitations
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-prereqs"></a>

**Prerequisites **
+ Basic knowledge of DynamoDB, including 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
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-tools"></a>

**AWS services**
+ [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) is a fully managed NoSQL database service that provides fast, predictable, and scalable performance.

**Other tools**
+ [AWS Pricing Calculator](https://docs.aws.amazon.com/pricing-calculator/latest/userguide/what-is-pricing-calculator.html) is a web-based planning tool that you can use to create estimates for your AWS use cases.

## Epics
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-epics"></a>

### Extract item information from your DynamoDB data model
<a name="extract-item-information-from-your-ddb-data-model"></a>


| Task | Description | Skills required | 
| --- | --- | --- | 
| Get item size. | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/estimate-storage-costs-for-an-amazon-dynamodb-table.html) | 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 | 

### Enter the item and object information in the Excel template
<a name="enter-the-item-and-object-information-in-the-excel-template"></a>


| Task | Description | Skills required | 
| --- | --- | --- | 
| Download and adjust the Excel spreadsheet. | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/estimate-storage-costs-for-an-amazon-dynamodb-table.html) | Data engineer | 
| Enter information in the Excel template. | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/estimate-storage-costs-for-an-amazon-dynamodb-table.html) | Data engineer | 

## Related resources
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-resources"></a>
+ [Pricing for On-Demand Capacity](https://aws.amazon.com/dynamodb/pricing/on-demand/) for Amazon DynamoDB
+ [AWS Pricing Calculator for DynamoDB](https://calculator.aws/#/createCalculator/DynamoDB)

## Additional information
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-additional"></a>

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](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/CapacityUnitCalculations.html). 

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 the Standard and Standard-Infrequent Access table classes in different AWS Regions, see [Pricing for On-Demand Capacity](https://aws.amazon.com/dynamodb/pricing/on-demand/).

## Attachments
<a name="attachments-9b74399d-9655-47ee-b9b3-de46b65bc4e3"></a>

To access additional content that is associated with this document, unzip the following file: [attachment.zip](samples/p-attach/9b74399d-9655-47ee-b9b3-de46b65bc4e3/attachments/attachment.zip)