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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南