Member-only story

DynamoDB….contd…

Insightful Savant
4 min readDec 1, 2021

--

Amazon DynamoDB is a fully managed NoSQL database service that lets you offload the administrative burdens of operating and scaling a distributed database. In this three part series, I am going to walk you through the basics of the service and lead you to best practices that could save you some operational expense while using this service.

This is the third and the last part of this series. To start from the beginning, visit this article..

Part C — Recommendations to keep your DynamoDB operational cost to a minimum

Best Practices to Save DynamoDB Cost

  1. Prune your tables systemically

Deleting unnecessary items from the operational data store and moving them into your organization’s data warehouse for archival or analytics is a best way to reduce storage cost. Note that DynamoDB does not have DELETE ON CASCADE like most RDBMS do. Therefore, you are responsible to delete the orphaned items on a multi relational data model in your datastore model.

2. Think Twice before using Strong Consistent Reads or Transactions API

Figure 3 — Cost of Reads and Writes in DynamoDB

DynamoDB charges almost twice as much for read units when using Strong consistent reads and twice more than the cost of consistent reads while using Transactional APIs. So, have a strong rationale while using Consistent Reads or Transaction APIs.

3. Consider using Reserved capacities while using Provisioned Instance

If your capacity is greater than 100 units, consider purchasing reserved capacity. For a three year term, reserved capacity provides a 76% discount, and for a one year term, reserved capacity provides a 53% discount when compared to provisioned throughput capacity. This will provide more savings to your business.

4. Know what a Scan does compared to Queries in DynamoDB

DynamoDB has two ways of fetching a set of records from it: Query and Scan. While the query is using partition and sort key to get the desired piece of data fast and directly, the scan, on the other hand, is scans through your whole table.

Having said that, in a query, you are charged only for items which are returned. However, in a scan case, you’re being…

--

--

Insightful Savant
Insightful Savant

Written by Insightful Savant

Architecture, cybersecurity, Cloud, psychological well-being and everything that's interesting!

No responses yet