- Newest
- Most votes
- Most comments
I'd suggest being careful about making significant assumptions about costs without testing them in practice. Documentation explains that deletion based on TTL is implemented as a background process and may take days to complete deleting an item after its expiration time. It further explains that to ensure your queries don't return items with expiration times in the past, you should apply explicit filters in your queries and scans to exclude them, further emphasising that the TTL-based deletions aren't immediate. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html
Therefore, I wouldn't expect the 1-hour TTL to be anywhere near one hour for either functional or pricing purposes but probably somewhere around 24-48 hours. If you're calling DeleteItem to delete your items explicitly, rather than relying on the TTL mechanism, the explicit deletions should be expected to be reflected within seconds.
If the data is deleted exactly after 1 hour, you only pay for the storage used during that time. DynamoDB charges are calculated for storage on an hourly basis.
You will also pay for Write requests
Thanks, to clarify does this mean that if the storage constantly contains 1000GB of data that is written and expired every hour then the cost will be 1,000 GB x 0.1132 USD?
if you remove old data every 1 hour and add new data every 1 hour, and in the result, you still have 1000Gb of data in the DynamoDB, you will pay for 1,000 GB x 0.1132 USD and charges for write requests according to your capacity mode (on-demand or provisioned)
Relevant content
- asked 5 months ago
- asked a year ago
- asked a year ago
- Accepted Answerasked 8 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
please accept the answer if it was helpful