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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠