lifeformed
lifeformed

Reputation: 525

DynamoDB pricing: do I get charged for a full hour if I just create and delete a table for a few minutes?

I'm a little confused by how pricing for DynamoDB works.

Let's say I create a table with 10k write capacity, @ $0.00065 per hour each. If I delete my table after a minute, do I still pay the $6.50? If I make new ones after deleting the old ones, am I paying $6.50 every time, even though only there is only ever one at a time?

Upvotes: 1

Views: 1680

Answers (2)

Daphne
Daphne

Reputation: 73

We had a related, but not entirely similar question for AWS, namely: If we set provisioned capacity for a table higher for less than an hour, are we charged for the whole hour or for part of the hour?

Our use case: regular provision capacity of 5 WCU, with a 20 minute increase to 40.000 WCU.

I think their answer is relevant for more people, so just posting it here.

"Pricing for DynamoDB Provisioned Capacity is calculated per hour, and how the provisioned capacity is computed for the hour is by picking a random data point within the hour, and charging for that. In other words, when it comes to provisioned capacity being billed, a random point within the hour is selected and used as the total provisioned capacity measure for that hour.

As within your use-case you have gone up to 40,000 WCU for 20mins roughly, there is another 40 minutes within that hour window where the provisioned capacity is 5 WCU. As such, the random minute point that is being chosen to be billed for that hour is within this period. Hence why the bill for this period is lower than calculated."

Upvotes: 1

hjpotter92
hjpotter92

Reputation: 80639

Yes. When you create anything that is billed by the usage-hour pattern, you will be charged for the entire hour.

As for creating the table afresh post-deletion, you won't be charged an additional $6.5 until the whole hour from the creation of first table is over. This however needs that the old table was deleted completely before creating the new one.

Upvotes: 2

Related Questions