How DynamoDB’s Pricing Works, Gets Expensive Quickly and the Best Alternatives

Jimmy Guerrero
The Distributed SQL Blog
5 min readJul 18, 2018

DynamoDB is AWS’s NoSQL alternative to Cassandra, primarily marketed to mid-sized and large enterprises. The uses cases best suited for DynamoDB include those that require a flexible data model, reliable performance, and the automatic scaling of throughput capacity. DynamoDB’s landing page points out that mobile, web, gaming, ad tech, and IoT are all good application types for DynamoDB.

If you are still deciding whether or not DynamoDB is the correct choice for your use case, check out “11 Things Your Wish You Knew Before Starting with DynamoDB.”

How does DynamoDB pricing work?

In a nutshell, DynamoDB’s monthly cost is dictated by data storage, writes and reads. Detailed pricing is available on the official pricing page for DynamoDB. Remember that prices can vary based on the region. Below is a synopsis:

Data Storage

DynamoDB charges per GB of disk space a table consumes. The first 25 GB consumed per month is free, and prices start at $0.25 per GB-month thereafter.

Writes

AWS calculates the cost of writes using “Write Capacity Units.” Each WCU provides up to one write per second, enough for 2.6 million writes per month. The first 25 WCUs per month are free. At the time of writing this post, prices start at $0.47 per WCU-month thereafter.

Reads

AWS calculates the cost of reads using “Read Capacity Units.” Each RCU provides up to two reads per second, enough for 5.2 million reads per month. The first 25 RCUs per month are free. As of the writing this post, prices start at $0.09 per RCU-month thereafter.

But wait, there’s more costs to consider…

There are some additional costs to be aware of which may affect your AWS bill at the end of the month besides data storage. Below are a few of them:

Provisioned throughput

Depending on the target utilization you’ve specified, auto scaling will kick in and along with it additional costs associated with RCUs and WCUs. Basically, if you end up needing more throughput than you originally anticipated, expect to pay more…automatically.

Reserved capacity

If you have a good handle on the characteristics of your workload and the shelf life of your application, you can opt for the reserved capacity option that AWS offers. This allows you to lock in a significant savings in exchange for a 1-year contract, and paying a one-time upfront fee for the privilege.

Indexed data storage

Don’t forget that indexes in DynamoDB aren’t free. AWS tacks on 100 bytes of storage overhead per item to account for indexes. Indexes are then added to your data storage bill.

Data transfer

If you are going to be transferring data between AWS Regions expect to pay additional fees.

Caching

Need a cache in front of DynamoDB? AWS offers DynamoDB Accelerator (DAX.) With DAX you pay for capacity by the hour based on the instance type chosen.

Global tables

This feature of DynamoDB allows you to deploy your tables across multiple AWS regions. Global tables are charged based on the resources associated with each replica table. Write capacity for global tables is represented by replicated WCUs instead of standard WCUs. Don’t forget about the fact that you are now transferring data between AWS Regions, so expect additional fees.

On-demand backup

Are you going to need to backup your DynamoDB instance for data archiving or compliance purposes? If so, expect to pay an additional fee per GB.

Continuous backups and point-in time recovery

Instead of backing up data on demand, do you want to enable continuous backups and point-in-time recovery? AWS will perform this task for you for an additional fee per GB.

Restoring a table

Need to restore a table from a backup? AWS will charge you per GB restored.

Streams

AWS offers DynamoDB Streams, which is a time-ordered sequence of item-level changes on a DynamoDB table. The first 2.5M reads per month are free, and $0.02 per 100,000 after that.

Calculating your DynamoDB costs

The accuracy of what you’ll pay at the end of the month is all going to depend on how good of a job you’ve done in estimating your workload and how that will translate into storage, RCU, WCUs and any DynamoDB “add-ons” you’ve opted in for.

AWS provides a handy calculator to help you estimate DynamoDB pricing for your workload.

When does DynamoDB become expensive?

If an application grows very quickly with increasingly larger data volumes that need to be stored and served, and if low latency and geo-distribution are must-have requirements for driving customer satisfaction, then DynamoDB becomes a cost-prohibitive choice that will also slow down release velocity.

You can read more about how DynamoDB becomes an expensive choice for fast growing companies in “The Million Dollar Engineering Problem” and in “11 Things You Wish You Knew Before Starting with DynamoDB.”

Are there more cost effective alternatives to DynamoDB?

Yes! And without making any compromises on features or functionality. You can actually save well over 10x by choosing an alternative database. There are several solid alternatives to choose from including:

For a detailed comparison of how DynamoDB stacks up against these popular projects in regards to features and TCO, read: “DynamoDB vs MongoDB vs Cassandra for Fast Growing Geographically Distributed Applications.”

What is YugaByte DB?

YugaByte DB is an open source multi-API/multi-model database with transactional consistency, low latency and geo-distribution built into the core of a common storage engine. It is a drop-in replacement for Apache Cassandra and Redis given its protocol-level compatibility with the languages spoken by these databases. PostgreSQL compatibility is currently in beta. YugaByte DB is a Consistent and Partition-tolerant (CP) database with a native JSONB document data type, high performance secondary indexes, cloud native operational ease and the ability to handle high data density. This makes YugaByte DB an excellent alternative to DynamoDB.

What’s next?

--

--