

• AWS Systems Manager CloudWatch 대시보드는 2026년 4월 30일 이후에는 더 이상 사용할 수 없습니다. 고객은 Amazon CloudWatch 콘솔을 계속 사용하여 현재와 마찬가지로 Amazon CloudWatch 대시보드를 보고, 생성하고, 관리할 수 있습니다. 자세한 내용은 [Amazon CloudWatch 대시보드 설명서](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)를 참조하세요.

# AWS CloudTrail를 사용하여 AWS Systems Manager API 호출 로깅
<a name="monitoring-cloudtrail-logs"></a>

AWS Systems Manager는 사용자, 역할 또는 AWS 서비스가 수행한 작업의 레코드를 제공하는 서비스인 [AWS CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)과 통합됩니다. CloudTrail은 Systems Manager에 대한 모든 API 직접 호출을 이벤트로 캡처합니다. 캡처되는 직접 호출에는 Systems Manager 콘솔로부터의 직접 호출과 Systems Manager API 작업에 대한 코드 직접 호출이 포함됩니다. CloudTrail에서 수집한 정보를 사용하여 Systems Manager에 수행된 요청, 요청이 수행된 IP 주소, 요청이 수행된 시간, 추가 세부 정보를 확인할 수 있습니다.

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

계정을 생성할 때 AWS 계정에서 CloudTrail이 활성 상태이며, CloudTrail **이벤트 기록**에 자동으로 액세스할 수 있습니다. CloudTrail **이벤트 기록**은 지난 90일 간 AWS 리전의 관리 이벤트에 대해 보기, 검색 및 다운로드가 가능하고, 수정이 불가능한 레코드를 제공합니다. 자세한 설명은 *AWS CloudTrail 사용 설명서*의 [CloudTrail 이벤트 기록 작업](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)을 참조하세요. **이벤트 기록** 보기는 CloudTrail 요금이 부과되지 않습니다.

지난 90일 동안 AWS 계정에서 진행 중인 이벤트 기록을 보려면 추적 또는 [CloudTrail Lake](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake.html) 이벤트 데이터 스토어를 생성합니다.

**CloudTrail 추적**  
CloudTrail은 *추적*을 사용하여 Amazon S3 버킷으로 로그 파일을 전송할 수 있습니다. AWS Management Console을 사용하여 만든 추적은 모두 다중 리전입니다. AWS CLI를 사용하여 단일 리전 또는 다중 리전 추적을 생성할 수 있습니다. 계정의 모든 AWS 리전에서 활동을 캡처하므로, 다중 리전 추적 생성이 권장됩니다. 단일 리전 추적을 생성하는 경우 추적의 AWS 리전에 로깅된 이벤트만 볼 수 있습니다. 추적에 대한 자세한 내용은 *AWS CloudTrail 사용 설명서*의 [AWS 계정에 대한 추적 생성](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html) 및 [조직에 대한 추적 생성](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-trail-organization.html)을 참조하세요.  
CloudTrail에서 추적을 생성하여 진행 중인 관리 이벤트의 사본 하나를 Amazon S3 버킷으로 무료로 전송할 수는 있지만, Amazon S3 스토리지 요금이 부과됩니다. CloudTrail 요금에 관한 자세한 내용은 [AWS CloudTrail 요금](https://aws.amazon.com/cloudtrail/pricing/)을 참조하세요. Amazon S3 요금에 관한 자세한 내용은 [Amazon S3 요금](https://aws.amazon.com/s3/pricing/)을 참조하세요.

**CloudTrail Lake 이벤트 데이터 스토어**  
*CloudTrail Lake*를 사용하면 이벤트에 대해 SQL 기반 쿼리를 실행할 수 있습니다. CloudTrail Lake는 행 기반 JSON 형식의 기존 이벤트를 [ Apache ORC](https://orc.apache.org/) 형식으로 변환합니다. ORC는 빠른 데이터 검색에 최적화된 열 기반 스토리지 형식입니다. 이벤트는 *이벤트 데이터 스토어*로 집계되며, 이벤트 데이터 스토어는 [고급 이벤트 선택기](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-concepts.html#adv-event-selectors)를 적용하여 선택한 기준을 기반으로 하는 변경 불가능한 이벤트 컬렉션입니다. 이벤트 데이터 스토어에 적용하는 선택기는 어떤 이벤트가 지속되고 쿼리에 사용 가능한지를 제어합니다. CloudTrail Lake에 관한 자세한 내용은 **AWS CloudTrail 사용 설명서의 [AWS CloudTrail Lake 작업](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake.html)을 참조하세요.  
CloudTrail Lake 이벤트 데이터 스토어 및 쿼리에는 비용이 발생합니다. 이벤트 데이터 스토어를 생성할 때 이벤트 데이터 스토어에 사용할 [요금 옵션](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-manage-costs.html#cloudtrail-lake-manage-costs-pricing-option)을 선택합니다. 요금 옵션에 따라 이벤트 모으기 및 저장 비용과 이벤트 데이터 스토어의 기본 및 최대 보존 기간이 결정됩니다. CloudTrail 요금에 관한 자세한 내용은 [AWS CloudTrail 요금](https://aws.amazon.com/cloudtrail/pricing/)을 참조하세요.

## CloudTrail의 Systems Manager 데이터 이벤트
<a name="cloudtrail-data-events"></a>

[데이터 이벤트](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#logging-data-events)는 리소스 기반 또는 리소스에서 수행된 리소스 작업에 대한 정보를 제공합니다(예: 컨트롤 채널 생성 또는 열기). 이를 데이터 플레인 작업이라고도 합니다. 데이터 이벤트는 흔히 대량 활동입니다. 기본적으로 CloudTrail은 데이터 이벤트를 로깅하지 않습니다. CloudTrail **이벤트 기록**은 데이터 이벤트를 기록하지 않습니다.

데이터 이벤트에는 추가 요금이 적용됩니다. CloudTrail 요금에 관한 자세한 내용은 [AWS CloudTrail 요금](https://aws.amazon.com/cloudtrail/pricing/)을 참조하세요.

CloudTrail 콘솔, AWS CLI 또는 CloudTrail API 작업을 사용하여 Systems Manager 리소스 유형에 대한 데이터 이벤트를 로깅할 수 있습니다. 데이터 이벤트를 로깅하는 방법에 관한 자세한 내용은 *AWS CloudTrail 사용 설명서*의 [AWS Management Console을 사용한 데이터 이벤트 로깅](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#logging-data-events-console) 및 [AWS Command Line Interface를 사용한 이벤트 데이터 로깅](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-with-the-AWS-CLI)을 참조하세요.

다음 표에는 데이터 이벤트를 로깅할 수 있는 Systems Manager 리소스 유형이 나열되어 있습니다. **데이터 이벤트 유형(콘솔)** 열에는 CloudTrail 콘솔의 **데이터 이벤트 유형** 목록에서 선택할 값이 표시됩니다. ****resources.type 값 열에는 AWS CLI 또는 CloudTrail API를 사용하여 고급 이벤트 선택기를 구성할 때 지정하는 `resources.type` 값이 표시됩니다. **CloudTrail에 로깅되는 데이터 API** 열에는 리소스 유형에 대해 CloudTrail에 로깅된 API 직접 호출이 표시됩니다.


| 데이터 이벤트 유형(콘솔) | resources.type 값 | CloudTrail에 로깅되는 데이터 API | 
| --- | --- | --- | 
| Systems Manager |  AWS::SSMMessages::ControlChannel  | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/systems-manager/latest/userguide/monitoring-cloudtrail-logs.html)이러한 작업에 대한 자세한 내용은 서비스 승인 참조의 [Amazon Message Gateway Service에서 정의한 작업](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmessagegatewayservice.html#amazonmessagegatewayservice-actions-as-permissions)을 참조하세요. | 
| Systems Manager 관리형 노드 |  AWS::SSM::ManagedNode  | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/systems-manager/latest/userguide/monitoring-cloudtrail-logs.html)`RequestManagedInstanceRoleToken` 작업에 대한 자세한 내용은 [하드웨어 지문을 사용하여 하이브리드 정품 인증 시스템 검증](ssm-agent-technical-details.md#fingerprint-validation) 섹션을 참조하세요. | 

`eventName`, `readOnly` 및 `resources.ARN` 필드를 필터링하여 중요한 이벤트만 로깅하도록 고급 이벤트 선택기를 구성할 수 있습니다. 이러한 필드에 관한 자세한 내용은 *AWS CloudTrail API 참조*의 [https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedFieldSelector.html](https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedFieldSelector.html) 섹션을 참조하세요.

## CloudTrail의 Systems Manager 관리 이벤트
<a name="cloudtrail-management-events"></a>

[관리 이벤트](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events)는 AWS 계정의 리소스에 대해 수행되는 관리 작업에 관한 정보를 제공합니다. 이를 컨트롤 플레인 작업이라고도 합니다. 기본적으로 CloudTrail은 관리 이벤트를 로깅합니다.

Systems Manager는 CloudTrail에 모든 컨트롤 플레인 작업을 CloudTrail에 관리 이벤트로 기록합니다. Systems Manager API 작업은 [AWS Systems Manager API 참조](https://docs.aws.amazon.com/systems-manager/latest/APIReference/Welcome.html)에 문서화됩니다. 예를 들어 `CreateMaintenanceWindows`, `PutInventory`, `SendCommand` 및 `StartSession` 작업을 호출하면 CloudTrail 로그 파일에 항목이 생성됩니다. Systems Manager API 호출을 모니터링하기 위해 CloudTrail을 설정하는 예는 [Amazon EventBridge를 사용하여 세션 활동 모니터링(콘솔)](session-manager-auditing.md#session-manager-auditing-eventbridge-events) 섹션을 참조하세요.

## Systems Manager 이벤트 예제
<a name="monitoring-cloudtrail-logs-log-entries-example"></a>

이벤트는 모든 소스로부터의 단일 요청을 나타내며 요청된 API 작업, 작업 날짜와 시간, 요청 파라미터 등에 관한 정보가 들어 있습니다. CloudTrail 로그 파일은 퍼블릭 API 직접 호출의 주문 스택 추적이 아니므로 이벤트가 특정 순서로 표시되지 않습니다.

**Topics**
+ [관리 이벤트 예제](#monitoring-cloudtrail-logs-log-entries-example-mgmt)
+ [데이터 이벤트 예제](#monitoring-cloudtrail-logs-log-entries-example-data)

### 관리 이벤트 예제
<a name="monitoring-cloudtrail-logs-log-entries-example-mgmt"></a>

**예 1: `DeleteDocument`**  
다음 예제는 미국 동부(오하이오)(us-east-2)의 `example-Document`라는 문서에 대한 `DeleteDocument` 작업을 알리는 CloudTrail 이벤트를 보여줍니다.

```
{
    "eventVersion": "1.04",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AKIAI44QH8DHBEXAMPLE:203.0.113.11",
        "arn": "arn:aws:sts::123456789012:assumed-role/example-role/203.0.113.11",
        "accountId": "123456789012",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
        "sessionContext": {
            "attributes": {
                "mfaAuthenticated": "false",
                "creationDate": "2018-03-06T20:19:16Z"
            },
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AKIAI44QH8DHBEXAMPLE",
                "arn": "arn:aws:iam::123456789012:role/example-role",
                "accountId": "123456789012",
                "userName": "example-role"
            }
        }
    },
    "eventTime": "2018-03-06T20:30:12Z",
    "eventSource": "ssm.amazonaws.com",
    "eventName": "DeleteDocument",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "203.0.113.11",
    "userAgent": "example-user-agent-string",
    "requestParameters": {
        "name": "example-Document"
    },
    "responseElements": null,
    "requestID": "86168559-75e9-11e4-8cf8-75d18EXAMPLE",
    "eventID": "832b82d5-d474-44e8-a51d-093ccEXAMPLE",
    "resources": [
        {
            "ARN": "arn:aws:ssm:us-east-2:123456789012:document/example-Document",
            "accountId": "123456789012"
        }
    ],
    "eventType": "AwsApiCall",
    "recipientAccountId": "123456789012",
    "eventCategory": "Management"
}
```

**예 2: `StartConnection`**  
다음 예제는 미국 동부(오하이오) 리전(us-east-2)에서 Fleet Manager를 사용하여 RDP 연결을 시작하는 사용자의 CloudTrail 이벤트를 보여줍니다. 기본 API 작업은 `StartConnection`입니다.

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AKIAI44QH8DHBEXAMPLE",
        "arn": "arn:aws:sts::123456789012:assumed-role/exampleRole",
        "accountId": "123456789012",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AKIAI44QH8DHBEXAMPLE",
                "arn": "arn:aws:sts::123456789012:assumed-role/exampleRole",
                "accountId": "123456789012",
                "userName": "exampleRole"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2021-12-13T14:57:05Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2021-12-13T16:50:41Z",
    "eventSource": "ssm-guiconnect.amazonaws.com",
    "eventName": "StartConnection",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "34.230.45.60",
    "userAgent": "example-user-agent-string",
    "requestParameters": {
        "AuthType": "Credentials",
        "Protocol": "RDP",
        "ConnectionType": "SessionManager",
        "InstanceId": "i-02573cafcfEXAMPLE"
    },
    "responseElements": {
        "ConnectionArn": "arn:aws:ssm-guiconnect:us-east-2:123456789012:connection/fcb810cd-241f-4aae-9ee4-02d59EXAMPLE",
        "ConnectionKey": "71f9629f-0f9a-4b35-92f2-2d253EXAMPLE",
        "ClientToken": "49af0f92-d637-4d47-9c54-ea51aEXAMPLE",
        "requestId": "d466710f-2adf-4e87-9464-055b2EXAMPLE"
    },
    "requestID": "d466710f-2adf-4e87-9464-055b2EXAMPLE",
    "eventID": "fc514f57-ba19-4e8b-9079-c2913EXAMPLE",
    "readOnly": false,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "123456789012",
    "eventCategory": "Management"
}
```

### 데이터 이벤트 예제
<a name="monitoring-cloudtrail-logs-log-entries-example-data"></a>

**예 1: `CreateControlChannel`**  
다음 예제는 `CreateControlChannel` 작업을 시연하는 CloudTrail 이벤트를 보여줍니다.

```
{
  "eventVersion":"1.08",
  "userIdentity":{
    "type":"AssumedRole",
    "principalId":"AKIAI44QH8DHBEXAMPLE",
    "arn":"arn:aws:sts::123456789012:assumed-role/exampleRole",
    "accountId":"123456789012",
    "accessKeyId":"AKIAI44QH8DHBEXAMPLE",
    "sessionContext":{
      "sessionIssuer":{
        "type":"Role",
        "principalId":"AKIAI44QH8DHBEXAMPLE",
        "arn":"arn:aws:iam::123456789012:role/exampleRole",
        "accountId":"123456789012",
        "userName":"exampleRole"
      },
      "attributes":{
        "creationDate":"2023-05-04T23:14:50Z",
        "mfaAuthenticated":"false"
      }
    }
  },
  "eventTime":"2023-05-04T23:53:55Z",
  "eventSource":"ssm.amazonaws.com",
  "eventName":"CreateControlChannel",
  "awsRegion":"us-east-1",
  "sourceIPAddress":"192.0.2.0",
  "userAgent":"example-agent",
  "requestParameters":{
    "channelId":"44295c1f-49d2-48b6-b218-96823EXAMPLE",
    "messageSchemaVersion":"1.0",
    "requestId":"54993150-0e8f-4142-aa54-3438EXAMPLE",
    "userAgent":"example-agent"
  },
  "responseElements":{
    "messageSchemaVersion":"1.0",
    "tokenValue":"Value hidden due to security reasons.",
    "url":"example-url"
  },
  "requestID":"54993150-0e8f-4142-aa54-3438EXAMPLE",
  "eventID":"a48a28de-7996-4ca1-a3a0-a51fEXAMPLE",
  "readOnly":false,
  "resources":[
    {
      "accountId":"123456789012",
      "type":"AWS::SSMMessages::ControlChannel",
      "ARN":"arn:aws:ssmmessages:us-east-1:123456789012:control-channel/44295c1f-49d2-48b6-b218-96823EXAMPLE"
    }
  ],
  "eventType":"AwsApiCall",
  "managementEvent":false,
  "recipientAccountId":"123456789012",
  "eventCategory":"Data"
}
```

**예 2: `RequestManagedInstanceRoleToken`**  
다음 예제는 `RequestManagedInstanceRoleToken` 작업을 시연하는 CloudTrail 이벤트를 보여줍니다.

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "123456789012:aws:ec2-instance:i-02854e4bEXAMPLE",
        "arn": "arn:aws:sts::123456789012:assumed-role/aws:ec2-instance/i-02854e4bEXAMPLE",
        "accountId": "123456789012",
        "accessKeyId": "AKIAI44QH8DHBEXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "123456789012:aws:ec2-instance",
                "arn": "arn:aws:iam::123456789012:role/aws:ec2-instance",
                "accountId": "123456789012",
                "userName": "aws:ec2-instance"
            },
            "attributes": {
                "creationDate": "2023-08-27T03:34:46Z",
                "mfaAuthenticated": "false"
            },
            "ec2RoleDelivery": "2.0"
        }
    },
    "eventTime": "2023-08-27T03:37:15Z",
    "eventSource": "ssm.amazonaws.com",
    "eventName": "RequestManagedInstanceRoleToken",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "192.0.2.0",
    "userAgent": "Apache-HttpClient/UNAVAILABLE (Java/1.8.0_362)",
    "requestParameters": {
        "fingerprint": "i-02854e4bf85EXAMPLE"
    },
    "responseElements": null,
    "requestID": "2582cced-455b-4189-9b82-7b48EXAMPLE",
    "eventID": "7f200508-e547-4c27-982d-4da0EXAMLE",
    "readOnly": true,
    "resources": [
        {
            "accountId": "123456789012",
            "type": "AWS::SSM::ManagedNode",
            "ARN": "arn:aws:ec2:us-east-1:123456789012:instance/i-02854e4bEXAMPLE"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": false,
    "recipientAccountId": "123456789012",
    "eventCategory": "Data"
}
```

CloudTrail 레코드 콘텐츠에 대한 자세한 내용은 **AWS CloudTrail 사용 설명서의 [CloudTrail record contents](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html)를 참조하세요.