

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 비용 이상 탐지와 함께 AWS 사용자 알림 사용
<a name="cad-user-notifications"></a>

[AWS 사용자 알림](https://docs.aws.amazon.com/notifications/latest/userguide/what-is-service.html)을 사용하여 비용 이상 탐지 이벤트에 대한 알림을 받을 전송 채널을 설정할 수 있습니다. 이벤트가 지정한 규칙과 일치하면 알림을 받습니다. 이메일, Amazon Chime, Microsoft Teams, Slack과 같은 [채팅 애플리케이션의 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 사용자 알림 콘솔에서 [콘솔 알림 센터를](https://console.aws.amazon.com/notifications/) 사용하여 알림을 볼 수도 있습니다.

AWS 사용자 알림은 집계도 지원하므로 특정 이벤트 중에 수신하는 알림 수를 줄일 수 있습니다. 자세한 내용은 [AWS 사용자 알림 사용 설명서](https://docs.aws.amazon.com/notifications/latest/userguide/what-is-service.html)를 참조하십시오.

 AWS 사용자 알림을 사용하려면 올바른 AWS Identity and Access Management(IAM) 권한이 있어야 합니다. IAM 권한 구성에 대한 자세한 내용은 *AWS 사용자 알림 사용설명서*의 [Creating a notification configuration](https://docs.aws.amazon.com/notifications/latest/userguide/getting-started.html#getting-started-step1)을 참조하십시오.

## 예:에 대한 EventBridge 이벤트 `Anomaly Detected`
<a name="cad-user-notifications-example"></a>

다음은 `Anomaly Detected`의 일반화 예시 이벤트입니다. AWS 사용자 알림을 사용하여 EventBridge 이벤트(예: 이벤트)를 구독할 수 있습니다.

```
{
    "version": "0",
    "id": "<id>", // alphanumeric string
    "source": "aws.ce",
    "detail-type": "Anomaly Detected",
    "account": "<account ID>", // 12 digit account id.
    "region": "<region>", // Cost Anomaly Detection home region.
    "time": "<date>", // Format: yyyy-MM-dd'T'hh:mm:ssZ
    "resources": [ 
         "arn:aws:ce::123456789012:anomalymonitor/abcdef12-1234-4ea0-84cc-918a97d736ef"
    ],
    "detail": {
         "accountName": "<account name>",
         "anomalyEndDate": "2021-05-25T00:00:00Z",
         "anomalyId": "12345678-abcd-ef12-3456-987654321a12",
         "anomalyScore": { 
            "currentScore": 0.47,
            "maxScore": 0.47
         },
         "anomalyStartDate": "2021-05-25T00:00:00Z",
         "dimensionValue": "<dimension value>", // service name for AWS Service Monitor
         "feedback": "string",
         "impact": {
            "maxImpact": 151,
            "totalActualSpend": 1301,
            "totalExpectedSpend": 300,
            "totalImpact": 1001,
            "totalImpactPercentage": 333.67
         },
         "rootCauses": [ 
            {
                "linkedAccount": "<linked account ID>", // 12 digit account id.
                "linkedAccountName": "<linked account name>",
                "region": "<region>",
                "service": "<service name>", // AWS service name
                "usageType": "<usage type>", // AWS service usage type
                "impact": {
                    "contribution": 601,
                }
            }
        ],
        "accountId": "<account ID>", // 12 digit account id.
        "monitorArn": "arn:aws:ce::123456789012:anomalymonitor/abcdef12-1234-4ea0-84cc-918a97d736ef",
        "monitorName": "<your monitor name>",
        "anomalyDetailsLink": "https://console.aws.amazon.com/cost-management/home#/anomaly-detection/monitors/abcdef12-1234-4ea0-84cc-918a97d736ef/anomalies/12345678-abcd-ef12-3456-987654321a12"
    }
}
```

## 이벤트 필터링
<a name="cad-user-notifications-filter"></a>

 AWS 사용자 알림 콘솔에서 사용할 수 있는 필터를 사용하거나 JSON 코드에서 자체 EventBridge 필터를 생성하는 경우 특정 속성을 사용하여 서비스 및 이름을 기준으로 이벤트를 필터링할 수 있습니다.

**Topics**
+ [예: 영향을 기준으로 필터링](#example-filter-by-impact)
+ [예: 서비스 차원을 기준으로 필터링](#example-filter-by-service-dimension)
+ [예: 비용 할당 태그를 기준으로 필터링](#example-filter-by-cost-allocation-tag)
+ [예: 리전 근본 원인을 기준으로 필터링](#example-filter-by-region-root-cause)
+ [예: 여러 기준을 기준으로 필터링](#example-filter-composition)

### 예: 영향을 기준으로 필터링
<a name="example-filter-by-impact"></a>

다음 필터는 총 영향이 100 USD를 초과하고 백분율 영향이 10%를 초과하는 모든 이상을 캡처합니다.

```
{
    "detail": {
        "impact": {
            "totalImpact": [{
                "numeric": [">", 100]
            }],
            "totalImpactPercentage": [{
                "numeric": [">", 10]
            }]
        }
    }
}
```

### 예: 서비스 차원을 기준으로 필터링
<a name="example-filter-by-service-dimension"></a>

다음 필터는 서비스 모니터에서 감지한 EC2 AWS 서비스와 관련된 이상을 캡처합니다.

```
{
    "detail": {
        "dimensionValue": ["Amazon Elastic Compute Cloud - Compute"],
        "monitorName": ["aws-services-monitor"]
    }
}
```

### 예: 비용 할당 태그를 기준으로 필터링
<a name="example-filter-by-cost-allocation-tag"></a>

다음 필터는 차원 비용 할당 태그 모니터에서 탐지한 프런트엔드 애플리케이션 팀의 이상을 캡처합니다.

```
{
  "detail": {
    "dimensionValue": ["ApplicationTeam:Frontend"],
    "monitorName": ["dimensional-CAT-monitor"]
  }
}
```

### 예: 리전 근본 원인을 기준으로 필터링
<a name="example-filter-by-region-root-cause"></a>

다음 필터는 미국 동부(버지니아 북부) 리전에서 근본 원인이 있는 이상을 캡처합니다.

```
{
  "detail": {
    "rootCauses": {
      "region": ["us-east-1"]
    }
  }
}
```

### 예: 여러 기준을 기준으로 필터링
<a name="example-filter-composition"></a>

다음 복합 필터는 총 영향이 100 USD를 초과하고, 백분율 영향이 10%를 초과하는 프런트엔드 애플리케이션 팀의 이상, 미국 동부(버지니아 북부) 리전의 근본 원인을 캡처합니다.

```
{
  "detail": {
    "dimensionValue": ["ApplicationTeam:Frontend"],
    "monitorName": ["dimensional-CAT-monitor"],
    "impact": {
        "totalImpact": [{ "numeric": [">", 100] }],
        "totalImpactPercentage": [{ "numeric": [">", 10] }]
    },
    "rootCauses": {
        "region": ["us-east-1"]
    }
  }
}
```