Monitoring Amazon IoT Events with Amazon CloudWatch - Amazon IoT Events
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).

End of support notice: On May 20, 2026, Amazon will end support for Amazon IoT Events. After May 20, 2026, you will no longer be able to access the Amazon IoT Events console or Amazon IoT Events resources. For more information, see Amazon IoT Events end of support.

Monitoring Amazon IoT Events with Amazon CloudWatch

When you develop or debug an Amazon IoT Events detector model, you need to know what Amazon IoT Events is doing, and any errors it encounters. Amazon CloudWatch monitors your Amazon resources and the applications you run on Amazon in real time. With CloudWatch, you gain systemwide visibility into resource use, application performance, and operational health. Enable Amazon CloudWatch logging when developing Amazon IoT Events detector models has information on how to enable CloudWatch logging for Amazon IoT Events. To generate logs like the one shown below you must set the Level of verbosity to 'Debug' and provide one or more Debug Targets that is a Detector Model Name and an optional KeyValue.

The following example shows a CloudWatch DEBUG level log entry generated by Amazon IoT Events.

{ "timestamp": "2019-03-15T15:56:29.412Z", "level": "DEBUG", "logMessage": "Summary of message evaluation", "context": "MessageEvaluation", "status": "Success", "messageId": "SensorAggregate_2th846h", "keyValue": "boiler_1", "detectorModelName": "BoilerAlarmDetector", "initialState": "high_temp_alarm", "initialVariables": { "high_temp_count": 1, "high_pressure_count": 1 }, "finalState": "no_alarm", "finalVariables": { "high_temp_count": 0, "high_pressure_count": 0 }, "message": "{ \"temp\": 34.9, \"pressure\": 84.5}", "messageType": "CUSTOMER_MESSAGE", "conditionEvaluationResults": [ { "result": "True", "eventName": "alarm_cleared", "state": "high_temp_alarm", "lifeCycle": "OnInput", "hasTransition": true }, { "result": "Skipped", "eventName": "alarm_escalated", "state": "high_temp_alarm", "lifeCycle": "OnInput", "hasTransition": true, "resultDetails": "Skipped due to transition from alarm_cleared event" }, { "result": "True", "eventName": "should_recall_technician", "state": "no_alarm", "lifeCycle": "OnEnter", "hasTransition": true } ] }