4

My application offers a WRITE API that writes and deletes data to DynamoDB, and we want to store an audit log of what happened, like this:

timestamp, account, ADD/DELETE, information

We want to be able to satisfy queries like:

  • For account X, give me all events
  • For account X, give me all events where information=Y
  • For account X, give me all events where information=Y and timestamp>Z

Would AWS Timestream be a good candidate solution for this? It can support queries like

SELECT * FROM "database"."table" 
WHERE time between ago(15m) and now() 
ORDER BY time DESC 
LIMIT 10 

which would be fitting our use case.

But it says on the documentation:

The ability to analyze massive amounts of data quickly and efficiently is one of Timestream’s greatest strengths. A single query executing over terabytes or even petabytes of data may have thousands of machines working on it all at the same time.

We don't need this ability. We are not analyzing data, we just need to retrieve it.

Also:

Timestream offers two data stores – an in-memory store and a cost-effective magnetic store

I don't think we need the in-memory store, as we don't care too much for speed of the response.

Maria Ines Parnisari
  • 16,584
  • 9
  • 85
  • 130
  • https://www.timescale.com/blog/timescaledb-vs-amazon-timestream-6000x-higher-inserts-175x-faster-queries-220x-cheaper/ – Maria Ines Parnisari Feb 23 '22 at 07:28
  • 1
    Hi, did you get answer for this question ? what approach did you go with ? – Himz Jun 22 '22 at 18:17
  • 2
    @Himz we are using DynamoDB transactions to store the event itself in one table and the changelog in another table. – Maria Ines Parnisari Jun 25 '22 at 23:18
  • 1
    Yeah, i am also leaning to the solution of using DynamoDB. I am thinking of single table design for it. Just curious, why the decision to keep changelog in separate table, rather than using single table design in DDB. – Himz Jun 29 '22 at 05:26
  • @Himz in our specific scenario our main table has many indexes. We don't want to index the changelog data – Maria Ines Parnisari Mar 12 '23 at 06:45

0 Answers0