

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

# 使用规则将事件发送到亚马逊以进行 Amazon EventBridge Chime SDK 消息传递
<a name="event-bridge-alerts"></a>

当错误阻止其调用 Amazon Lex V2 机器人时，Amazon Chime SDK 会发送 EventBridge 事件。您可以创建识别这些事件的 EventBridge 规则，并在匹配规则时自动采取行动。有关更多信息，请参阅[ EventBridge 《亚马逊* EventBridge 用户指南》中的亚马逊*规则](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html)。

以下示例显示了典型故障事件。

```
{
  version: '0',
  id: '12345678-1234-1234-1234-111122223333',
  'detail-type': 'Chime Messaging AppInstanceBot Lex Failure',
  source: 'aws.chime',
  account: 'aws-account-id',
  time: 'yyyy-mm-ddThh:mm:ssZ',
  region: "region",
  resources: [],
  detail: {    
    resourceArn: 'arn:aws:chime:region:aws-account-id:app-instance/app-instance-id/bot/app-instance-bot-id',
    failureReason: "1 validation error detected: Value at 'text' failed to satisfy constraint: Member must have length less than or equal to 1024 (Service: LexRuntimeV2, Status Code: 400, Request ID: request-id)"
  }
}
```