Math activity - Amazon IoT Analytics
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

For similar capabilities to Amazon IoT Analytics, explore Amazon Kinesis, Amazon S3, and Amazon Athena. These services provide additional scalability and flexibility to meet your evolving analytics requirements. Learn how here.

Math activity

A math activity computes an arithmetic expression using the message's attributes. The expression must return a number. For example, given the following input message:

{ "tempF": 50, }

after processing by the following math activity:

{ "math": { "name": "MyMathActivity", "math": "(tempF - 32) / 2", "attribute": "tempC", "next": "MyDatastoreActivity" } }

the resulting message looks like:

{ "tempF" : 50, "tempC": 9 }