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
已提问 2 年前538 查看次数
1 回答
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
专家
Greg_B
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则