We have standard SQL based DB that stores User’s activities. Since there are millions of activities are stored in DB, doing aggregation on the fly will be very expensive so we are thinking of pushing\replicating these activities into DynamoDB and use dynamo DB streams (events) + Lamda to provide real-time aggregation.
This should work if types of aggregation that need to be done are fixed from the beginning. In our case, we want to keep adding new aggregation in the future based on new uses cases. Although I am not sure how can I regenerated those event streams as it won’t be available after 24 hours!
Can anyone explain to me how can we add more aggregation on the go after the initial setup?