Skip to content

How do I optimize costs for DynamoDB workloads?

2 minute read
1

I want to optimize the cost of my Amazon DynamoDB workloads.

Resolution

Use the AWS Pricing Calculator

Use the AWS Pricing Calculator for DynamoDB to estimate the cost of your DynamoDB workloads before you build them. This includes the cost of features such as on-demand capacity mode, backup and restore, Amazon DynamoDB Streams, and Amazon DynamoDB Accelerator (DAX).

Choose your throughput mode

You can choose either on-demand mode or provisioned mode for your DynamoDB throughput capacity.

It's a best practice to use on-demand mode for unpredictable application traffic. With on-demand mode, you pay only for what you use.

If you configure a table in provisioned mode, then you're charged for the capacity you provision, even if you don't fully use it. If you have unused DynamoDB tables in your AWS account, then use on-demand mode to reduce the cost of your unused tables.

Use provisioned mode for application traffic that's consistent or ramps gradually. If you can forecast capacity requirements, then use this mode to control costs. Also, you can use DynamoDB auto scaling to optimize the allocated throughput.

Choose your table class

You can use either the DynamoDB Standard or DynamoDB Standard-Infrequent Access (DynamoDB Standard-IA) table class for your DynamoDB table.

For the majority of DynamoDB tables, it's a best practice to use the default DynamoDB Standard table class.

The DynamoDB Standard-IA table class can reduce costs for tables that store data that you don't access regularly. Use this table class for long-term data storage that you don't use often, such as application logs or old social media posts.

Note: Reads and writes for DynamoDB Standard-IA cost more than for standard tables.

For more information, see Considerations when choosing a table class in DynamoDB.

Optimize your table usage patterns and identify unused resources

Certain table usage patterns aren't optimal for DynamoDB. To improve performance and reduce cost, evaluate your table usage patterns to determine whether they're efficient for your tables. Also, check for and clean up unused resources.

Use cost allocation tags

Use AWS cost allocation tags to assign tags to your tables and view cost breakouts for each tag.

Related information

DynamoDB pricing

Cost optimization with AWS

Optimizing costs on DynamoDB tables

AWS OFFICIALUpdated 10 months ago