I have a dynamoDB table where I store sensor events.
HASH KEY: sensor id
RANGE KEY: timestamp
sensor info
I now need a query for the latest event of every sensor.
The only solution I can come up with is to query the latest event for each sensor id. But that would be a lot of queries with 2000+ sensors. I don't want to scan the whole table to sort it out afterwards either since the table can grow quite fast.
Any ideas?