I have a use case where I need to store some data (just a few hundreds) of records with just one column (a string similar to a UUID) and timestamp.
Also I need to have an efficient way to avoid duplicates of the main column (not the timestamp) and perform reads/writes/deletes frequently.
I’m currently using an RDS database but it seems overkill for this.
Using AWS services what would be the best way, taking in consideration that performance and cost are important.
2
Answers
Consider Amazon MemoryDB, probably the best options you can get for price/performance if you have tiny data set. Because it’s im-memory db, it’s really fast and low latency and you won’t pay much for one instance cluster with smallest Node type.
Another option can be Aurora Serverless if you want regular RDS, depends on your usage pattern in the end of the day might be more expensive option.
Frankly, you could just use Amazon S3.
Think of it as a NoSQL database:
Key
is the Key of the object (which guarantees uniqueness)Value
is the content of the objectYou could do fancy stuff Filtering and retrieving data using Amazon S3 Select – Amazon Simple Storage Service, but frankly I’d suggest you just read the whole object and parse it in your code. It sounds like your items would be small enough to keep in memory.
To update information in the object, just PUT the whole object again with the updated information. It would be very fast since your data would be kept in memory within your app.
The only issue would be if you have simultaneous updates of the data due to parallel-running of the application.