

# Monitor Amazon IoT using CloudWatch Logs
<a name="cloud-watch-logs"></a>

When [Amazon IoT logging is enabled](configure-logging.md), Amazon IoT sends progress events about each message as it passes from your devices through the message broker and rules engine. In the [CloudWatch console](https://console.amazonaws.cn/cloudwatch), CloudWatch logs appear in a log group named **AWSIotLogs**. 

For more information about CloudWatch Logs, see [CloudWatch Logs](https://docs.amazonaws.cn/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatchLogs.html). For information about supported Amazon IoT CloudWatch Logs, see [CloudWatch Logs Amazon IoT log entries](cwl-format.md) .

## Viewing Amazon IoT logs in the CloudWatch console
<a name="viewing-logs"></a>

**Note**  
The `AWSIotLogsV2` log group is not visible in the CloudWatch console until:  
You've enabled logging in Amazon IoT. For more info on how to enable logging in Amazon IoT, see [Configure Amazon IoT logging](configure-logging.md) 
Some log entries have been written by Amazon IoT operations.

**To view your Amazon IoT logs in the CloudWatch console**

1.  Browse to [https://console.amazonaws.cn/cloudwatch/](https://console.amazonaws.cn/cloudwatch/). In the navigation pane, choose **Log groups**. 

1. In the **Filter** text box, enter **AWSIotLogsV2** , and then press Enter.

1. Double-click the `AWSIotLogsV2` log group.

1. Choose **Search All**. A complete list of the Amazon IoT logs generated for your account is displayed.

1. Choose the expand icon to look at an individual stream.

You can also enter a query in the **Filter events** text box. Here are some interesting queries to try:
+  `{ $.logLevel = "INFO" }` 

   Find all logs that have a log level of `INFO`. 
+  `{ $.status = "Success" }` 

   Find all logs that have a status of `Success`. 
+  `{ $.status = "Success" && $.eventType = "GetThingShadow" }` 

   Find all logs that have a status of `Success` and an event type of `GetThingShadow`. 

For more information about creating filter expressions, see [CloudWatch Logs Queries](https://docs.amazonaws.cn/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). 