IoT Rule -> Timestream

0

Does IoT Core batch messages to Timestream or invoke the WriteRecords API for every incoming message? The Timestream "Best Practices" docs recommends batching to optimize data ingestion performance & cost.

https://docs.aws.amazon.com/timestream/latest/developerguide/data-ingest.html

Thanks.

otl
asked 2 years ago522 views
1 Answer
0

Hi otl. An AWS IoT rule is evaluated against each incoming message. So if you use the Timestream rule action it will not batch messages. If you are handling a high volume of messages, you may instead consider to use a different rule action to batch the messages in another service before writing into Timestream. This blog explains using Kinesis Data Streams for the batching: https://aws.amazon.com/blogs/database/near-real-time-processing-with-amazon-kinesis-amazon-timestream-and-grafana/

If you have control over the device firmware, you might also consider to batch messages on the device side. IoT messages are billed in 5KB increments. Therefore you can reduce costs by putting multiple measurements into a single message up to 5KB (if the timing constraints of your application will allow it): https://docs.aws.amazon.com/wellarchitected/latest/iot-lens/optimizing-over-time.html. The Timestream rule action can only handle a single timestamp per message. So if you batched on the device like this, you would have to use the Lambda rule action to write into Timestream.

profile pictureAWS
EXPERT
Greg_B
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions