- Newest
- Most votes
- Most comments
Amazon Timestream multi-measure records feature was recently released 11-29-2021 (https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-timestream-scheduled-queries-multi-measure-records-magnetic-storage-writes/) and the AWS IoT Timestream action does not yet support multi-measure records. As a workaround you can trigger a Lambda function using the AWS IoT Lambda Action and use the AmazonTimestream Write API to insert your multi-measure record : https://docs.aws.amazon.com/timestream/latest/developerguide/API_WriteRecords.html
if you need have deviceid, cpu, disc and memory in same row then add add all four to the dimensions. Check out this blogpost for an example https://aws.amazon.com/blogs/database/trigger-notifications-on-time-series-data-with-amazon-timestream/
answered 5 years ago
Thanks for the answer, I guess the support for multi measure records will be available at some point of time. That's why I want to follow the best practices for the time being. I will implement a lambda function as a workaround for now.
For those interested in the answer, multi measurement insertion support is added to javascript-sdk with this release: 2.1036.0 https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md#210360
By the time of writing the default available sdk version on aws lambda is 2.1001.0.
So need to be careful about the available sdk version.
answered 5 years ago

You can find a non-production-ready sample code for a Lambda function for writing to Amazon Timestream (though single-record, not multi-record) here: https://github.com/aws-samples/aws-iot-core-lorawan/blob/main/timestream/src-lambda-write-to-timestream/app.py
Thanks for the answer. I guess I will create a lambda function for now to insert a multi measure record. Is there any intention to support multi measure record in AWS IoT Timestream action? Hoping it will be supported eventually.
So any updates?
We need an update to this. The cost reduction for high volume data ingestion is going to be reduced substantially if this gets implemented.