I am trying to switch from redis to dynamoDB and sofar, everything works fine! The only thing I still have to find out is the expiration of the key. Currently, I have a data setup with one primary key and no range key:
{ "key" => string, "value" => ["string", "string"], "timestamp" => seconds since epoch }
What I thought was to do a database scan where the timestamp is less than a certain value and then explicitly delete them. This, however, seems extremely inefficient and will use a ridiculous number of read / write modules for no reason! Also, the expiration will only happen when I run the scan so that they can create.
So, did anyone find a good solution to this problem?
source share