

终止支持通知：2026 年 5 月 20 日， AWS 将终止对的支持。 AWS IoT Events 2026 年 5 月 20 日之后，您将无法再访问 AWS IoT Events 控制台或 AWS IoT Events 资源。有关更多信息，请参阅[AWS IoT Events 终止支持](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-end-of-support.html)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 示例：为配置日志选项 AWS IoT Events
<a name="logging-options"></a>

正确的日志记录对于监控、调试和审计 AWS IoT Events 应用程序非常重要。本节概述了中提供的日志记录选项 AWS IoT Events。

此示例演示如何配置允许将数据记录 AWS IoT Events 到日志的 IAM 角色。 CloudWatch 在资源 ARN 中使用通配符 (`*`) 可以全面记录整个 AWS IoT Events 基础架构。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": [
                    "iotevents.amazonaws.com"
                ]
            },
            "Action": "sts:AssumeRole",
            "Condition": {
                "StringEquals": {
                "aws:SourceAccount": "{{123456789012}}"
                },
                "ArnEquals": {
                "aws:SourceArn": "arn:aws:iotevents:{{us-east-1}}:{{123456789012}}:*"
                }
            }
        }
    ]
}
```

------