AWS IoT Rule Engine is great, but...

Seriously, why??? After all of those years, you trick me like that? What have I done to you, AWS IoT?

I think that the AWS IoT Rule Engine is great.
It enables serverless IoT backends.
I recommend it to my customers.
But it hates me in return.

/posts/aws_iot_sql/aws_iot_sql.002.png

I implemented a solution that receives temperature readings and stores them in Amazon Timestream. I deployed it using my trusted AWS IoT Rule Engine. Everything was fine until Timestream started complaining that:

Measure name already has an assigned measure value type. Each measure name can have only one measure value type and cannot be changed.

Ok, I thought, I will handle that using AWS IoT Rule SQL Function. I used the cast function, which “converts a value from one data type to another” - quote from AWS Docs.

/posts/aws_iot_sql/aws_iot_sql.003.png

Since Amazon Timestream kept complaining about input data, I investigated every single step - the device’s firmware, MQTT Payloads, IoT Rule Error Actions, CloudWatch, you name it.

I invested hours in it and made no progress.

Please reply to (lmtx@thingrex.com) with your guesses about what helped me find the solution.

/posts/aws_iot_sql/aws_iot_sql.004.png

Support quality content❤️ Donate💰

Sign up for news: (by subscribing you accept the privacy policy)