

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

# AWS Support의 모니터링 및 로깅
<a name="monitoring-overview"></a>

지원 및 다른 AWS 솔루션의 신뢰성, 가용성 및 성능을 유지하려면 모니터링이 중요합니다. AWS는 지원를 모니터링하고, 이상이 있을 때 이를 보고하고, 필요한 경우 자동 조치를 취할 수 있도록 다음과 같은 모니터링 도구를 제공합니다.
+ *Amazon EventBridge*는 AWS 리소스의 변경 사항을 설명하는 시스템 이벤트의 스트림을 거의 실시간으로 제공합니다. EventBridge는 특정 이벤트를 감시하는 규칙을 작성하고 이러한 이벤트가 발생할 때 다른 AWS 서비스에서 자동화된 작업을 트리거할 수 있으므로 자동화된 이벤트 기반 컴퓨팅이 가능합니다. 자세한 내용은 [Amazon EventBridge 사용 설명서](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html)를 참조하세요.
+ *AWS CloudTrail*은 직접 수행하거나 AWS 계정을 대신하여 수행한 API 호출 및 관련 이벤트를 캡처하고 지정한 Amazon S3 버킷에 로그 파일을 전송합니다. 어떤 사용자 및 계정이 AWS를 직접적으로 호출했는지, 어떤 소스 IP 주소에 직접 호출이 이루어졌는지, 언제 직접 호출이 발생했는지 확인할 수 있습니다. 자세한 내용은 [AWS CloudTrail 사용 설명서](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)를 참조하세요.

**Topics**
+ [

# Amazon EventBridge AWS Support 를 사용하여 이벤트 기반 애플리케이션에 통합
](eventbridge-integration.md)
+ [

# 를 사용하여 AWS Support API 호출 로깅 AWS CloudTrail
](logging-using-cloudtrail.md)
+ [

# 를 사용하여 Slack API 호출에서 AWS Support 앱 로깅 AWS CloudTrail
](logging-using-cloudtrail-support-app.md)

# Amazon EventBridge AWS Support 를 사용하여 이벤트 기반 애플리케이션에 통합
<a name="eventbridge-integration"></a>

 AWS Support 에서 발생하는 이벤트를 사용하여 애플리케이션 구성 요소 간에 통신하고 다운스트림 프로세스를 시작하는 이벤트 기반 애플리케이션(EDAs)에 AWS Support 를 통합할 수 있습니다.

예를 들어 계정에서 다음 AWS Support 이벤트가 발생할 때마다 알림을 받을 수 있습니다.
+ 지원 사례가 생성되거나, 해결되거나, 다시 열림
+ 기존 지원 사례에 서신 추가

이렇게 하려면 Amazon EventBridge를 사용하여에서 다른 소프트웨어 구성 요소로 이벤트를 라우팅 AWS Support 합니다. Amazon EventBridge는 이벤트를 사용하여 애플리케이션 구성 요소를 함께 연결하는 서버리스 서비스이므로 추가 코드 및 작업 없이와 같은 AWS 서비스를 이벤트 기반 아키텍처 AWS Support 에 더 쉽게 통합할 수 있습니다.

## EventBridge가 AWS Support 이벤트를 라우팅하는 방법
<a name="eventbridge-routes-service-events-aws.support"></a>

EventBridge가 AWS Support 이벤트와 작동하는 방식은 다음과 같습니다.

많은 AWS 서비스와 마찬가지로는 이벤트를 AWS Support 생성하고 EventBridge 기본 *이벤트 버스*로 전송합니다. 이벤트 버스는 이벤트를 수신하여 지정한 목적지 또는 *대상*으로 라우팅하는 라우터입니다. 대상에는 다른 AWS 서비스, 사용자 지정 애플리케이션 및 SaaS 파트너 애플리케이션이 포함될 수 있습니다.

EventBridge는 사용자가 이벤트 버스에서 생성한 *규칙*에 따라 이벤트를 라우팅합니다. 각 규칙마다 필터 또는 *이벤트 패턴*을 지정하여 원하는 이벤트만 선택할 수 있습니다. 이벤트가 이벤트 버스로 전송될 때마다 EventBridge는 이벤트를 각 규칙과 비교합니다. 이벤트가 규칙과 일치하면 EventBridge는 이벤트를 지정된 대상으로 라우팅합니다.

![\[AWS 서비스는 EventBridge 기본 이벤트 버스로 이벤트를 전송합니다. 이벤트가 규칙의 이벤트 패턴과 일치하면 EventBridge는 해당 규칙에 지정된 대상으로 이벤트를 라우팅합니다.\]](http://docs.aws.amazon.com/ko_kr/awssupport/latest/user/images/eventbridge-integration-how-it-works.png)


## AWS Support 이벤트
<a name="supported-events"></a>

AWS Support 는 다음 이벤트를 기본 EventBridge 이벤트 버스로 자동으로 전송합니다.


| 이벤트 세부 정보 유형 | 설명 | 
| --- | --- | 
|  [지원 사례 업데이트](event-detail-support-case-update.md)  |  지원 사례의 변경 사항을 나타냅니다.  | 

### 이벤트 구조
<a name="eventbridge-event-structure"></a>

 AWS 서비스의 모든 이벤트에는 두 가지 유형의 데이터가 포함됩니다.
+ 이벤트의 소스인 AWS 서비스, 이벤트가 생성된 시간, 이벤트가 발생한 계정 및 리전 등 이벤트에 대한 메타데이터가 포함된 공통 필드 세트입니다. 이러한 일반 필드의 정의는 *Amazon EventBridge 이벤트 참조*의 [이벤트 구조](https://docs.aws.amazon.com/eventbridge/latest/ref/overiew-event-structure.html)를 참조하세요.
+ 해당 특정 서비스 이벤트와 관련된 데이터를 포함한 `detail` 필드.

### AWS Support 를 통한 이벤트 전송 AWS CloudTrail
<a name="eventbridge-events-via-cloudtrail"></a>

AWS 서비스는 이벤트를 EventBridge 기본 이벤트 버스로 직접 전송할 수 있습니다. 또한는 수많은 AWS 서비스에서 시작된 이벤트도 EventBridge로 AWS CloudTrail 전송합니다. 이러한 이벤트에는 API 직접 호출, 콘솔 로그인 및 작업, 서비스 이벤트, CloudTrail Insights가 포함될 수 있습니다. 자세한 내용은 *EventBridge 사용 설명서*의 [AWS CloudTrail을 통해 전달되는AWS 서비스 이벤트](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event-cloudtrail.html)를 참조하세요.

EventBridge로 전송된 AWS Support 이벤트 목록은 [https://docs.aws.amazon.com/eventbridge/latest/ref/welcome.html](https://docs.aws.amazon.com/eventbridge/latest/ref/welcome.html) 참조의 AWS Support 주제를 참조하세요.

## 이벤트와 일치하는 AWS Support 이벤트 패턴 생성
<a name="eventbridge-event-delivery-filter"></a>

이벤트 패턴은 선택하려는 이벤트에 있어야 하는 데이터를 지정하는 필터입니다.

각 이벤트 패턴은 다음을 포함하는 JSON 객체입니다.
+ 이벤트를 전송하는 서비스를 식별하는 `source` 속성입니다. AWS Support 이벤트의 경우 소스는 입니다`aws.support`.
+ (선택 사항): 일치해야 하는 이벤트 이름의 배열을 포함하는 `detail-type` 속성.
+ (선택 사항): 일치시킬 다른 이벤트 데이터를 포함하는 `detail` 속성입니다.

예를 들어 다음 이벤트 패턴은 AWS Support의 모든 지원 사례 업데이트 이벤트를 선택합니다.

```
{
  "source": ["aws.support"],
  "detail-type": ["Support Case Update"]
}
```

이벤트 자체에 값을 포함하면 이벤트를 더 구체적으로 선택할 수 있습니다. 예를 들어 다음 이벤트 패턴은 다시 열리는 사례를 나타내는 지원 사례 업데이트 이벤트와 일치합니다.

```
{
  "source": ["aws.support"],
  "detail-type": ["Support Case Update"],
  "detail": {
      "event-name": "ReopenCase"
    }
}
```

이벤트 작성에 대한 자세한 내용은 *EventBridge 사용 설명서*의 [이벤트 패턴](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html)을 참조하세요.

### 다음 사항도 참조하세요.
<a name="see-also-eventbridge-support"></a>

에서 EventBridge를 사용하는 방법에 대한 자세한 내용은 다음 리소스를 AWS Support참조하세요.
+ [Amazon EventBridge를 사용하여 AWS Support API를 자동화하는 방법](https://aws.amazon.com/blogs/mt/how-to-automate-aws-support-api-with-amazon-eventbridge)
+ GitHub의 [AWS Support 사례 활동 알림](https://github.com/aws-samples/aws-support-case-activity-notifier) 

# 지원 사례 업데이트 이벤트
<a name="event-detail-support-case-update"></a>

다음은 `Support Case Update` 이벤트의 세부 정보 필드입니다.

`source` 및 `detail-type` 필드는 AWS Support 이벤트에 대한 특정 값을 포함하므로 아래에 포함되어 있습니다. 모든 이벤트에 포함된 다른 메타데이터 필드의 정의는 *Amazon EventBridge 이벤트 참조*의 [이벤트 구조](https://docs.aws.amazon.com/eventbridge/latest/ref/overiew-event-structure.html)를 참조하세요.

```
{
  . . .,
  "detail-type": "Support Case Update",
  "source": "aws.support",
  . . .,
  "detail": {
    "case-id" : "string",
    "display-id" : "string",
    "communication-id" : "string",
    "event-name" : "string",
    "origin" : "string"
  }
}
```

`detail-type`  <a name="support-case-update-detail-type"></a>
이벤트의 유형을 식별합니다.  
이 이벤트의 경우 이 값은 `Support Case Update`입니다.

`source`  <a name="support-case-update-source"></a>
이벤트를 생성한 서비스를 식별합니다. AWS Support 이벤트의 경우이 값은 입니다`aws.support`.

`detail`  <a name="support-case-update-detail"></a>
이벤트에 대한 정보를 포함하는 JSON 객체입니다. 이벤트를 생성하는 서비스에 따라 이 필드의 내용이 결정됩니다.  
이 이벤트의 경우 이 데이터에는 다음이 포함됩니다.    
`case-id`  <a name="support-case-update-case-id"></a>
지원 사례 ID. 사례 ID는 case-*12345678910-2013-c4c1d2bf33c5cf47* 형식의 영숫자 문자열입니다.  
`display-id`  <a name="support-case-update-display-id"></a>
 AWS Support 센터의 페이지에 있는 사례의 식별자입니다.  
`communication-id`  <a name="support-case-update-communication-id"></a>
통신 ID.  
`event-name`  <a name="support-case-update-event-name"></a>
*유효한 값*: `CreateCase` \$1 `AddCommunicationToCase` \$1 `ResolveCase` \$1 `ReopenCase`  
지원 사례 이벤트의 유형을 지정합니다.  
`origin`  <a name="support-case-update-origin"></a>
유효한 값**: `AWS` \$1 `CUSTOMER`  
사용자 또는 AWS Support 에이전트가 지원 사례에 사례 대응 서신을 추가했는지 여부를 지정합니다.  
현재는 `event-name`이 `AddCommunicationToCase`인 이벤트만 이 값을 갖습니다.

**Example 지원 사례 업데이트 이벤트 예제: 지원 사례 생성됨**  <a name="event-detail-support-case-update.example-1"></a>

```
{
    "version": "0",
    "id": "3433df007-9285-55a3-f6d1-536944be45d7",
    "detail-type": "Support Case Update",
    "source": "aws.support",
    "account": "111122223333",
    "time": "2022-02-21T15:51:19Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "case-id": "case-111122223333-muen-2022-7118885805350839",
        "display-id": "1234563851",
        "communication-id": "",
        "event-name": "CreateCase",
        "origin": ""
    }
}
```

**Example 지원 사례 업데이트 이벤트 예제:지원 사례에 대한 AWS Support 회신**  <a name="event-detail-support-case-update.example-2"></a>

```
{
    "version": "0",
    "id": "f90cb8cb-32be-1c91-c0ba-d50b4ca5e51b",
    "detail-type": "Support Case Update",
    "source": "aws.support",
    "account": "111122223333",
    "time": "2022-02-21T15:51:31Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "case-id": "case-111122223333-muen-2022-7118885805350839",
        "display-id": "1234563851",
        "communication-id": "ekko:us-east-1:12345678-268a-424b-be08-54613cab84d2",
        "event-name": "AddCommunicationToCase",
        "origin": "AWS"
    }
}
```

**Example 지원 사례 업데이트 이벤트 예제: 지원 사례 해결됨**  <a name="event-detail-support-case-update.example-3"></a>

```
{
    "version": "0",
    "id": "1aa4458d-556f-732e-ddc1-4a5b2fbd14a5",
    "detail-type": "Support Case Update",
    "source": "aws.support",
    "account": "111122223333",
    "time": "2022-02-21T15:51:31Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "case-id": "case-111122223333-muen-2022-7118885805350839",
        "display-id": "1234563851",
        "communication-id": "",
        "event-name": "ResolveCase",
        "origin": ""
    }
}
```

**Example 지원 사례 업데이트 이벤트 예제: 지원 사례 다시 열림**  <a name="event-detail-support-case-update.example-4"></a>

```
{
    "version": "0",
    "id": "3bb9d8fe-6089-ad27-9508-804209b233ad",
    "detail-type": "Support Case Update",
    "source": "aws.support",
    "account": "111122223333",
    "time": "2022-02-21T15:47:19Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "case-id": "case-111122223333-muen-2021-27f40618fe0303ea",
        "display-id": "1234563851",
        "communication-id": "",
        "event-name": "ReopenCase",
        "origin": ""
    }
}
```

# 를 사용하여 AWS Support API 호출 로깅 AWS CloudTrail
<a name="logging-using-cloudtrail"></a>

AWS Support 는 사용자 AWS CloudTrail, 역할 또는 서비스가 수행한 작업에 대한 레코드를 제공하는 AWS 서비스와 통합됩니다 AWS Support. CloudTrail은에 대한 API 호출을 이벤트 AWS Support 로 캡처합니다. 캡처되는 호출에는 AWS Support 콘솔의 호출과 AWS Support API 작업에 대한 코드 호출이 포함됩니다.

추적을 생성하면 이벤트를 포함하여 CloudTrail 이벤트를 Amazon Simple Storage Service(Amazon S3) 버킷에 지속적으로 배포할 수 있습니다 AWS Support. 추적을 구성하지 않은 경우에도 CloudTrail 콘솔의 **이벤트 기록**에서 최신 이벤트를 볼 수 있습니다.

CloudTrail에서 수집한 정보를 사용하여 AWS Support에 수행된 요청, 요청이 수행된 IP 주소, 요청을 수행한 사람, 요청이 수행된 시간 및 추가 세부 정보를 확인할 수 있습니다.

구성 및 사용 방법을 포함하여 CloudTrail에 대한 자세한 내용은 [AWS CloudTrail 사용 설명서](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)를 참조하세요.

## AWS Support CloudTrail의 정보
<a name="aws-support-info-in-cloudtrail-history"></a>

 AWS 계정을 생성할 때 계정에서 CloudTrail이 활성화됩니다. 지원되는 이벤트 활동이에서 발생하면 AWS Support해당 활동은 **이벤트 기록**의 다른 AWS 서비스 이벤트와 함께 CloudTrail 이벤트에 기록됩니다. AWS 계정에서 최근 이벤트를 보고 검색하고 다운로드할 수 있습니다. 자세한 내용은 [CloudTrail 이벤트 기록을 사용하여 이벤트 보기](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)를 참조하세요.

에 대한 이벤트를 포함하여 AWS 계정에 이벤트를 지속적으로 기록하려면 *추적*을 AWS Support생성합니다. CloudTrail은 추적을 사용하여 Amazon S3 버킷으로 로그 파일을 전송할 수 있습니다. 콘솔에서 추적을 생성하면 기본적으로 모든 AWS Region에 추적이 적용됩니다. 추적은 AWS 파티션의 모든 리전에서 이벤트를 로깅하고 지정한 Amazon S3 버킷으로 로그 파일을 전송합니다. 추가적으로, CloudTrail 로그에서 수집된 이벤트 데이터를 추가 분석 및 처리하도록 다른 AWS 서비스를 구성할 수 있습니다. 자세한 내용은 다음 자료를 참조하세요.
+ [추적 생성 개요](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail 지원 서비스 및 통합](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
+ [CloudTrail에 대한 Amazon SNS 알림 구성](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html)
+ [여러 리전에서 CloudTrail 로그 파일 수신](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html) 및 [여러 계정에서 CloudTrail 로그 파일 수신](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

모든 AWS Support API 작업은 CloudTrail에서 로깅되며 [AWS Support API 참조](https://docs.aws.amazon.com/awssupport/latest/APIReference/)에 문서화됩니다.

예를 들어, `CreateCase`, `DescribeCases` 및 `ResolveCase` 작업에 대한 직접 호출은 CloudTrail 로그 파일의 항목을 생성합니다.

모든 이벤트 또는 로그 항목에는 요청을 생성했던 사용자에 대한 정보가 포함됩니다. ID 정보를 이용하면 다음을 쉽게 판단할 수 있습니다.
+ 요청이 루트 또는 AWS Identity and Access Management (IAM) 사용자 자격 증명으로 이루어졌는지 여부입니다.
+ 역할 또는 페더레이션 사용자의 임시 자격 증명을 사용하여 요청이 생성되었는지 여부.
+ 요청이 다른 AWS 서비스에서 이루어졌는지 여부입니다.

자세한 내용은 [CloudTrail userIdentity 요소](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)를 참조하세요.

여러 AWS 리전 및 AWS 여러 계정의 AWS Support 로그 파일을 단일 Amazon S3 버킷으로 집계할 수도 있습니다.

## AWS Trusted Advisor CloudTrail 로깅의 정보
<a name="cloudtrail-logging-for-trusted-advisor"></a>

Trusted Advisor 는 계정에서 비용을 절감하고, 보안을 개선하고, AWS 계정을 최적화하는 방법을 확인하는 데 사용할 수 있는 AWS Support 서비스입니다.

모든 Trusted Advisor API 작업은 CloudTrail에서 로깅되며 [AWS Support API 참조](https://docs.aws.amazon.com/awssupport/latest/APIReference/)에 문서화됩니다.

예를 들어, `DescribeTrustedAdvisorCheckRefreshStatuses`, `DescribeTrustedAdvisorCheckResult` 및 `RefreshTrustedAdvisorCheck` 작업에 대한 직접 호출은 CloudTrail 로그 파일의 항목을 생성합니다.

**참고**  
CloudTrail은 Trusted Advisor 콘솔 작업도 기록합니다. [를 사용하여 AWS Trusted Advisor 콘솔 작업 로깅 AWS CloudTrail](logging-using-cloudtrail-for-aws-trusted-advisor.md)을(를) 참조하세요.

## AWS Support 로그 파일 항목 이해
<a name="understanding-aws-support-entries"></a>

트레일이란 지정한 S3 버킷에 이벤트를 로그 파일로 입력할 수 있게 하는 구성입니다. CloudTrail 로그 파일에는 하나 이상의 로그 항목이 포함될 수 있습니다. 이벤트는 모든 소스의 단일 요청을 의미합니다. 여기에는 요청된 작업에 대한 정보, 작업 날짜 및 시간, 요청 파라미터 등이 포함됩니다. CloudTrail 로그 파일은 퍼블릭 API 직접 호출의 주문 스택 트레이스가 아니므로 특정 순서로 표시되지 않습니다.

**Example : CreateCase에 대한 로그 항목**  
다음 예제는 [CreateCase](https://docs.aws.amazon.com/awssupport/latest/APIReference/API_CreateCase.html) 작업에 대한 CloudTrail 로그 항목을 보여줍니다.  

```
{
   "Records": [
      {
         "eventVersion": "1.04",
         "userIdentity": {
            "type": "IAMUser",
            "principalId": "AIDACKCEVSQ6C2EXAMPLE",
            "arn": "arn:aws:iam::111122223333:user/janedoe",
            "accountId": "111122223333",
            "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
            "userName": "janedoe",
            "sessionContext": {
               "attributes": {
                  "mfaAuthenticated": "false",
                  "creationDate": "2016-04-13T17:51:37Z"
               }
            },
            "invokedBy": "signin.amazonaws.com"
         },
         "eventTime": "2016-04-13T18:05:53Z",
         "eventSource": "support.amazonaws.com",
         "eventName": "CreateCase",
         "awsRegion": "us-east-1",
         "sourceIPAddress": "198.51.100.15",
         "userAgent": "signin.amazonaws.com",
         "requestParameters": {
            "severityCode": "low",
            "categoryCode": "other",
            "language": "en",
            "serviceCode": "support-api",
            "issueType": "technical"
         },
         "responseElements": {
            "caseId": "case-111122223333-muen-2016-c3f2077e504940f2"
         },
         "requestID": "58c257ef-01a2-11e6-be2a-01c031063738",
         "eventID": "5aa34bfc-ad5b-4fb1-8a55-2277c86e746a",
         "eventType": "AwsApiCall",
         "recipientAccountId": "111122223333"
      }
   ],
   ...
}
```

**Example : RefreshTrustedAdvisorCheck에 대한 로그 항목**  
다음 예제는 [RefreshTrustedAdvisorCheck](https://docs.aws.amazon.com/awssupport/latest/APIReference/API_RefreshTrustedAdvisorCheck.html) 작업에 대한 CloudTrail 로그 항목을 보여 줍니다.  

```
{
    "eventVersion": "1.05",
    "userIdentity": {
        "type": "IAMUser",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE",
        "arn": "arn:aws:iam::111122223333:user/Admin",
        "accountId": "111122223333",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
        "userName": "Admin"
    },
    "eventTime": "2020-10-21T16:34:13Z",
    "eventSource": "support.amazonaws.com",
    "eventName": "RefreshTrustedAdvisorCheck",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "72.21.198.67",
    "userAgent": "signin.amazonaws.com",
    "requestParameters": {
        "checkId": "Pfx0RwqBli"
    },
    "responseElements": null,
    "requestID": "4c4d5fc8-c403-4f82-9544-41f820e0fa01",
    "eventID": "2f4630ac-5c27-4f0d-b93f-63742d6fc85e",
    "eventType": "AwsApiCall",
    "recipientAccountId": "111122223333"
}
```

# 를 사용하여 Slack API 호출에서 AWS Support 앱 로깅 AWS CloudTrail
<a name="logging-using-cloudtrail-support-app"></a>

Slack의 AWS Support 앱은와 통합됩니다 AWS CloudTrail. CloudTrail은 AWS Support 앱에서 사용자, 역할 또는가 수행한 작업에 대한 레코드 AWS 서비스 를 제공합니다. 이 레코드를 생성하기 위해 CloudTrail은 AWS Support 앱에 대한 모든 퍼블릭 API 호출을 이벤트로 캡처합니다. 캡처된 이러한 호출에는 AWS Support 앱 콘솔의 호출과 AWS Support 앱 퍼블릭 API 작업에 대한 코드 호출이 포함됩니다. 추적을 생성하면 CloudTrail 이벤트를 지속적으로 Amazon S3 버킷에 배포할 수 있습니다. 여기에는 AWS Support 앱에 대한 이벤트가 포함됩니다. 추적을 구성하지 않은 경우에도 **이벤트 기록**에서 CloudTrail 콘솔의 최신 이벤트를 볼 수 있습니다. CloudTrail이 수집하는 정보를 사용하여 AWS Support 앱에 수행된 요청을 확인할 수 있습니다. 또한 어떤 IP 주소에서 호출했는지, 누가 언제 요청했는지 등의 추가 세부 정보도 확인할 수 있습니다.

CloudTrail에 대한 자세한 내용은 [AWS CloudTrail 사용 설명서](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)를 참조하세요.

## AWS Support CloudTrail의 앱 정보
<a name="service-name-info-in-cloudtrail-support-app"></a>

를 생성하면 계정에서 CloudTrail이 AWS 계정활성화됩니다. AWS Support 앱에서 퍼블릭 API 활동이 발생하면 해당 활동이 **이벤트 기록**의 다른 AWS 서비스 이벤트와 함께 CloudTrail 이벤트에 기록됩니다. 에서 최근 이벤트를 보고 검색하고 다운로드할 수 있습니다 AWS 계정. 자세한 내용은 [CloudTrail 이벤트 기록을 사용하여 이벤트 보기](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)를 참조하세요.

 AWS Support 앱 이벤트를 AWS 계정포함하여에 이벤트를 지속적으로 기록하려면 *추적*을 생성합니다. 콘솔에서 트레일을 생성하면 기본적으로 모든 AWS 리전에 트레일이 적용됩니다. 추적은 AWS 파티션에 있는 모든 리전의 이벤트를 로깅하고 지정된 Amazon S3 버킷으로 로그 파일을 전송합니다. 또한 CloudTrail 로그에서 수집된 이벤트 데이터를 추가로 분석하고 데이터를 처리 AWS 서비스 하도록 다른를 구성할 수 있습니다. 자세한 내용은 다음 자료를 참조하세요.
+ [추적 생성 개요](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail 지원 서비스 및 통합](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html)
+ [CloudTrail에 대한 Amazon SNS 알림 구성](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/configure-sns-notifications-for-cloudtrail.html)
+ [여러 리전에서 CloudTrail 로그 파일 받기](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html) 및 [여러 계정에서 CloudTrail 로그 파일 받기](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

CloudTrail은 모든 퍼블릭 AWS Support 앱 작업을 로깅합니다. 이러한 조치는 [Slack API의AWS Support 앱 참조](https://docs.aws.amazon.com/supportapp/latest/APIReference/Welcome.html)에도 설명되어 있습니다. 예를 들어 `CreateSlackChannelConfiguration`, `GetAccountAlias`, `UpdateSlackChannelConfiguration` 작업을 직접 호출하면 CloudTrail 로그 파일에 항목이 생성됩니다.

모든 이벤트 또는 로그 항목에는 요청을 생성했던 사용자에 관한 정보가 포함됩니다. ID 정보를 이용하면 다음을 쉽게 판단할 수 있습니다.
+ 요청이 루트 또는 AWS Identity and Access Management (IAM) 사용자 자격 증명으로 이루어졌는지 여부입니다.
+ 역할 또는 페더레이션 사용자의 임시 자격 증명을 사용하여 요청이 생성되었는지 여부.
+ 다른 AWS 서비스에서 요청했는지 여부

자세한 내용은 [CloudTrail userIdentity 요소](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)를 참조하세요.

## AWS Support 앱 로그 파일 항목 이해
<a name="understanding-service-name-entries-support-app"></a>

트레일이란 지정한 S3 버킷에 이벤트를 로그 파일로 입력할 수 있게 하는 구성입니다. CloudTrail 로그 파일에는 하나 이상의 로그 항목이 포함될 수 있습니다. 이벤트는 모든 소스로부터의 단일 요청을 나타내며 요청 작업, 작업 날짜와 시간, 요청 파라미터 등에 대한 정보가 들어 있습니다. CloudTrail 로그 파일은 퍼블릭 API 호출의 정렬된 스택 트레이스가 아닙니다. 즉, 로그가 특정 순서로 표시되지 않습니다.

**Example : `CreateSlackChannelConfiguration`에 대한 로그 예**  
다음 예제는 [CreateSlackChannelConfiguration](https://docs.aws.amazon.com/supportapp/latest/APIReference/API_CreateSlackChannelConfiguration.html) 작업에 대한 CloudTrail 로그 항목을 보여줍니다.  

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE:JaneDoe",
        "arn": "arn:aws:sts::111122223333:assumed-role/Administrator/JaneDoe",
        "accountId": "111122223333",
        "accessKeyId": "AKIAI44QH8DHBEXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AIDACKCEVSQ6C2EXAMPLE",
                "arn": "arn:aws:iam::111122223333:role/Administrator",
                "accountId": "111122223333",
                "userName": "Administrator"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2022-02-26T01:37:57Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2022-02-26T01:48:20Z",
    "eventSource": "supportapp.amazonaws.com",
    "eventName": "CreateSlackChannelConfiguration",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "205.251.233.183",
    "userAgent": "aws-cli/1.3.23 Python/2.7.6 Linux/2.6.18-164.el5",
    "requestParameters": {
        "notifyOnCreateOrReopenCase": true,
        "teamId": "T012ABCDEFG",
        "notifyOnAddCorrespondenceToCase": true,
        "notifyOnCaseSeverity": "all",
        "channelName": "troubleshooting-channel",
        "notifyOnResolveCase": true,
        "channelId": "C01234A5BCD",
        "channelRoleArn": "arn:aws:iam::111122223333:role/AWSSupportAppRole"
    },
    "responseElements": null,
    "requestID": "d06df6ca-c233-4ffb-bbff-63470c5dc255",
    "eventID": "0898ce29-a396-444a-899d-b068f390c361",
    "readOnly": false,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "111122223333",
    "eventCategory": "Management"
}
```

**Example : `ListSlackChannelConfigurations`에 대한 로그 예**  
다음 예제는 [ListSlackChannelConfigurations](https://docs.aws.amazon.com/supportapp/latest/APIReference/API_ListSlackChannelConfigurations.html) 작업에 대한 CloudTrail 로그 항목을 보여줍니다.  

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE:AWSSupportAppRole",
        "arn": "arn:aws:sts::111122223333:assumed-role/AWSSupportAppRole",
        "accountId": "111122223333",
        "accessKeyId": "AKIAI44QH8DHBEXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AIDACKCEVSQ6C2EXAMPLE",
                "arn": "arn:aws:iam::111122223333:role/AWSSupportAppRole",
                "accountId": "111122223333",
                "userName": "AWSSupportAppRole"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2022-03-01T20:06:32Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2022-03-01T20:06:46Z",
    "eventSource": "supportapp.amazonaws.com",
    "eventName": "ListSlackChannelConfigurations",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "72.21.217.131",
    "userAgent": "aws-cli/1.3.23 Python/2.7.6 Linux/2.6.18-164.el5",
    "requestParameters": null,
    "responseElements": null,
    "requestID": "20f81d63-31c5-4351-bd02-9eda7f76e7b8",
    "eventID": "70acb7fe-3f84-47cd-8c28-cc148ad06d21",
    "readOnly": true,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "111122223333",
    "eventCategory": "Management"
}
```

**Example : `GetAccountAlias`에 대한 로그 예**  
다음 예제는 [GetAccountAlias](https://docs.aws.amazon.com/supportapp/latest/APIReference/API_GetAccountAlias.html) 작업에 대한 CloudTrail 로그 항목을 보여줍니다.  

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE:devdsk",
        "arn": "arn:aws:sts::111122223333:assumed-role/AWSSupportAppRole/devdsk",
        "accountId": "111122223333",
        "accessKeyId": "AKIAI44QH8DHBEXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AIDACKCEVSQ6C2EXAMPLE",
                "arn": "arn:aws:iam::111122223333:role/AWSSupportAppRole",
                "accountId": "111122223333",
                "userName": "AWSSupportAppRole"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2022-03-01T20:31:27Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2022-03-01T20:31:47Z",
    "eventSource": "supportapp.amazonaws.com",
    "eventName": "GetAccountAlias",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "72.21.217.142",
    "userAgent": "aws-cli/1.3.23 Python/2.7.6 Linux/2.6.18-164.el5",
    "requestParameters": null,
    "responseElements": null,
    "requestID": "a225966c-0906-408b-b8dd-f246665e6758",
    "eventID": "79ebba8d-3285-4023-831a-64af7de8d4ad",
    "readOnly": true,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "111122223333",
    "eventCategory": "Management"
}
```