I am going to set up a DynamoDB on aws, and their pricing is about .3$/GB a month. If i store 500 GB for an hour, do some work on it, then remove 200GB after an hour. Do i have to pay for the 500 GB used for the whole month or, 500 GB for the hour it was on the DB ?
Short version: it's billed hourly or thereabouts.
Pricing says
This means 1GB for 1 month costs $0.285. It also means 0.5GB for a month or 1GB for half a month is charged at half that. If you put in a lot of data, use it for a short time, then remove it, you're billed for the time it's stored - I guess at the hour or day level.
with dynamodb you should worry about write cost than storage cost.
If importing of 500gb data requires you to write 5 milllion records with average record size of 1kb, costs you 750$
It will cost you same again for deleting.
so be careful with dynamodb :)