I have a large number of Iot Devices that are generating data and sending it to IoT Core through MQTT. I need to store this telemetry data in a timestream table. I am trying to reduce costs as much as I can, while keeping the latency reasonably low. Eventual consistency is enough.
Using the IoT Core Rules Timestream action is out of the question because I need to use Multi-Measure records
Currently, what I'm doing is this : An IoT Core Rule, sends each record to a lambda which then inserts it into the timestream table. This means that the lambda is invoked once per record and data is inserted into timestream, once per record.
I'd like to take advantage of Batching in order to reduce my costs. I'd like to know what are the best practises and patterns for achieving this are. Any help and suggestions are welcome!