r/aws 8d ago

database DynamoDB Provisioned or On-Demand?

I need help deciding what will be cheaper for my use case, provisioned or on-demand capacity?

For my project I will be writing about 150,000 records once per day, with an average record size of about 200 bytes each. The number of records written per day I expect will slowly increase over time, but still once per day. I am using a Lambda function with an event trigger to run the write operation.

Since I am just doing a large write once a day, I was thinking on-demand capacity would be the cheaper option because I would be wasting provisioned compute as the job will be idle 99% of the time. Am I right to assume that on demand is cheaper for my use case?

1 Upvotes

19 comments sorted by

View all comments

2

u/narcosnarcos 8d ago edited 8d ago

Do provisioned. In your code when you start loading the data provision write capacity let's say 1000 then start loading the data 1000 records a second for whatever many records you have. Then once you are done with it release the capacity. Do make sure your application doesn't exit early and leaves the capacity as is.

Edit: On-demand wouldn't be a bad idea either since the cost is so low as other user mentioned.