

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 搭配 使用 AWS 使用者通知 AWS Control Tower
<a name="using-user-notifications"></a>

您可以使用[AWS 使用者通知](https://docs.aws.amazon.com/notifications/latest/userguide/what-is.html)來設定交付管道，以接收事件的 AWS Control Tower 通知。當事件符合您指定的規則時，便會收到通知。您可以透過多個管道接收事件的通知，包括電子郵件、[聊天應用程式中的 Amazon Q Developer](https://docs.aws.amazon.com/chatbot/latest/adminguide/what-is.html) 聊天通知，或[AWS 主控台行動應用程式](https://docs.aws.amazon.com/consolemobileapp/latest/userguide/what-is-consolemobileapp.html)推送通知。您也可以在主控台通知中心查看通知。

AWS 使用者通知支援彙總，可減少您在特定事件期間收到的通知數量。通知也會顯示在主控台通知中心。

透過 AWS 使用者通知而非 EventBridge 訂閱通知的優點包括：
+ 友善的使用者介面 (UI)。
+ 與 AWS 主控台整合，位於全域導覽列的鈴鐺/通知區域。
+ 原生支援電子郵件通知，不需要設定 Amazon SNS。
+ 最值得注意的是，支援行動推播通知， AWS 使用者通知獨有。

例如，在 Security Hub CSPM 嚴重和高嚴重性問題清單的情況下，您可能希望收到的通知類型之一。JSON 中用來設定通知訂閱的程式碼片段可能如下所示：

```
{
  "detail": {
    "findings": {
      "Compliance": {
        "Status": ["FAILED", "WARNING", "NOT_AVAILABLE"]
      },
      "RecordState": ["ACTIVE"],
      "Severity": {
        "Label": ["CRITICAL", "HIGH"]
      },
      "Workflow": {
        "Status": ["NEW", "NOTIFIED"]
      }
    }
  }
}
```

**事件篩選**
+ 您可以使用 AWS 使用者通知主控台上提供的篩選條件，依服務和名稱篩選事件。
+ 如果您從 JSON 程式碼建立自己的 EventBridge 篩選條件，您可以依特定屬性篩選事件。

**範例 AWS Control Tower 事件**

以下是 的廣義範例事件 AWS Control Tower。
+ 這是 EventBridge 事件。
+ 您可以使用 AWS 使用者通知訂閱 EventBridge 事件 （例如此事件）。

```
{
    "version": "0",
    "id": "<id>", // alphanumeric string
    "detail-type": "AWS Service Event via CloudTrail",
    "source": "aws.controltower",
    "account": "<account ID>", // Management account ID. 
    "time": "<date>", // Format: yyyy-MM-dd'T'hh:mm:ssZ 
    "region": "<region>", // AWS Control Tower home region.
    "resources": [],
    "detail": {
        "eventVersion": "1.05",
        "userIdentity": {
            "accountId": "121212121212",
            "invokedBy": "AWS Internal"
        },
        "eventTime": "2018-08-30T21:42:18Z", // Timestamp when call was made. Format: yyyy-MM-dd'T'hh:mm:ssZ.
        "eventSource": "controltower.amazonaws.com",
        "eventName": "<event name>", // one of the 9 event names in https://docs.aws.amazon.com/controltower/latest/userguide/lifecycle-events.html
        "awsRegion": "<region>",
        "sourceIPAddress": "AWS Internal",
        "userAgent": "AWS Internal",
        "eventID": "<id>",
        "readOnly": false,
        "eventType": "AwsServiceEvent",
        "serviceEventDetails": {
            // the contents of this object vary depending on the event subtype and event state
        }
    }
}
```