WTF are read capacity units (RCU) and write capacity units (WCU) in DynamoDB (Cost $$)

Chris Biscardi
InstructorChris Biscardi
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 4 years ago

DynamoDB's cost model is built on Read and Write Capacity Units. It's likely that you'll start out in the free tier and it's still good to start building up an understanding of how what you do in DynamoDB will affect how much you pay.

Don't Worry too much. The amounts we're talking about here are dollars for up to a million units.

  • $1.25 per million write request units
  • $0.25 per million read request units

Instructor: [00:00] We said earlier that DynamoDB has two major pricing models, on-demand and provisioned. The table we're looking at right now has a provision capacity, per beat capacity, as well as write capacity.

[00:12] That capacity is 5 for both. If we look at an on-demand table, you'll see that the read-write capacity mode is on-demand and that there's no provision values. Let's look at what a read capacity unit and a write capacity unit are. When you read from a DynamoDB table for an item up to 4 KB in size, that counts as one read capacity unit.

[00:32] For example, if your item was 8 KB, that would count as two read capacity units. It's the same thing for write capacity units except the amount is smaller. When you're writing, 1 KB is one write capacity unit. A 2 KB item would require two write capacity units.

[00:49] For both read capacity and write capacity units, you have the option of making them strongly consistent or transactional. In this case, that doubles the size of the read capacity unit or write capacity units.

[01:01] If we were reading an item that's 4 KB in size with a strongly consistent or transactional read, it would count as two read capacity units. The same thing happens for transactional writes. If we had an item that was 3 KB or you're going to include it in a transaction write request, that will cost us six write capacity units.

[01:20] If this is a little hard to hold in your head, Dynobase has a DynamoDB pricing calculator that handles the on-demand and provision capacity modes. If we were going to provision 10 write capacity units and 10 read capacity units per second under the free tier, that wouldn't cost us anything. If we weren't using the free tier, that would cost us about six dollars a month.

[01:40] Note that how much data in the table also affects your cost, but we're not talking about how much data is in your table in this video.

egghead
egghead
~ a minute ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today