I have 2 sensors that publish data to Topic1 and Topic2 respectively.
There is a subscription from both devices to the same Lambda function on both the topics.
Example data received by lambda from sensor-
When sensor1 triggered the lambda: {"sensor1":10}
When sensor2 triggered the lambda: {"sensor2":20}
I want to write the lambda function logic to check both values together. Example: if sensor1 value is >10 and sensor2 value>10 then publish msg to some topic.
Presently when the lambda function gets triggered, it has data from one sensor only. How can I combine data from 2 sensors into lambda function?