Instructor: 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.
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.
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.
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.
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.
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.
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.