DynamoDB Costs Savings

Saving money on your DynamoDB database

Read on Beehiiv | September 8, 2024

Welcome to The Cloud Economist!

Last week I talked about the importance and benefits of right-sizing. With right-sizing you can achieve significant cost savings as well as performance benefits.

I ended the newsletter by sharing one right-sizing tip on using cost intelligence platforms to achieve fine-grained cost tracking to help you optimize and monitor costs more efficiently.

If you missed that you can read it here.

Last Week’s Question

In the question of the week, I asked what are some methods/tools you can use to identify and eliminate zombie resources that might be inflating your cloud bill.

Last Week’s Answer

There are two principal services that are designed to help you with this:

  1. Cost Explorer’s Resource Optimization Reports: You’ll get a report of EC2 instances that are either idle or have low utilization.

  2. Trusted Advisor: you can use Trusted Advisor to detect idle load balancers, unused EBS volumes, underutilized EC2 instances, and other resource inefficiencies.

This week we’ll explore some interesting methods of saving money on your DynamoDB database costs.

Here are the best articles I’ve found on cloud cost savings this week, summarized.

This article shares 13 effective tips to reduce your DynamoDB table costs.

These include:

  1. Choosing a region that offers the lowest costs

  2. Purging orphaned data

  3. Use queries before scans

  4. Keep your attribute names short

  5. Avoid strongly consistent reads and transactional writes

  6. Don’t Store Large Objects in DynamoDB

  7. Use reserved capacity when you can

  8. Use Provisioned Mode Where You Can

  9. Use global secondary indexes wisely

  10. Apply on-demand mode to unused tables or delete them

  11. Store Infrequently Accessed Data in Standard Infrequent Access Tables.

  12. Use On-Demand Backup Rather Than Continuous Backup

  13. Use DynamoDB Metrics to Optimize Capacity

Read the article for more details on these tips.

Hiren shares 8 proven strategies and things to watch out for to cut down costs in DynamoDB.

  1. Use on-demand mode when you do not know yet the traffic patterns of your application

  2. Use Auto Scaling for your provisioned capacity tables

  3. Enable tagging for table-level cost analysis

  4. Choose the right table class: This is about choosing the right table that best fits your application’s balance between storage and throughput usage.

  5. Find unused tables or global secondary indexes

  6. Store large items efficiently

  7. Identify sub-optimal usage patterns: scanning tables are costly. Using transactions cost 4x as much as plain reads, Global tables can also drive up your monthly bill.

One Tip on Cloud Cost Savings

Using TTLs can potentially save you thousands of dollars per month. When you write data to your tables that should not be stored permanently (log files, session data, tokens, etc) add a TTL attribute to the expirable item.

This will clear up your database of irrelevant data reducing your monthly bill.

This Week’s Question

How can you optimize the cost and latency of your queries by only getting the data you need and nothing more? (unused data in your queries leads to high charges at scale).

I encourage you to send in your answers!

Until next week.

The Cloud Economist