

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

# Amazon EventBridge로 Systems Manager 이벤트 모니터링
<a name="monitoring-eventbridge-events"></a>

Amazon EventBridge는 애플리케이션을 다양한 소스의 데이터와 연결할 수 있는 서버리스 이벤트 버스 서비스입니다. EventBridge는 자체 애플리케이션, 서비스형 소프트웨어(SaaS) 애플리케이션 및 AWS 서비스의 실시간 데이터 스트림을 제공한 다음, 해당 데이터를 AWS Lambda 등의 대상으로 라우팅합니다. 데이터를 전송할 대상을 결정하는 라우팅 규칙을 설정하여 모든 데이터 소스에 실시간으로 대응하는 애플리케이션 아키텍처를 구축할 수 있습니다. EventBridge를 사용하면 느슨하게 결합되고 분산되는 이벤트 기반 아키텍처를 구축할 수 있습니다.

이전에는 EventBridge를 Amazon CloudWatch Events라고 했습니다. EventBridge에는 SaaS 파트너 및 자체 애플리케이션에서 이벤트를 수신할 수 있는 새로운 기능이 포함되어 있습니다. 기존 CloudWatch Events 사용자는 새 EventBridge 콘솔과 CloudWatch 이벤트 콘솔에서 기존 기본 버스, 규칙 및 이벤트에 액세스할 수 있습니다. EventBridge는 동일한 CloudWatch Events API를 사용하므로 기존의 모든 CloudWatch Events API 사용량이 동일하게 유지됩니다.

EventBridge는 수십 개의 AWS 서비스에서 이벤트를 규칙에 추가하고 20개 이상의 AWS 서비스에서 대상을 추가할 수 있습니다.

EventBridge는 AWS Systems Manager 이벤트와 Systems Manager 대상을 모두 지원합니다.

**지원되는 Systems Manager 이벤트 유형**  
다음은 EventBridge가 감지할 수 있는 여러 유형의 Systems Manager 이벤트입니다.
+ 수동 승인을 위한 JIT(Just-in-Time) 노드 액세스 요청 상태 업데이트.
+ 실패한 JIT(Just-in-Time) 노드 액세스 요청.
+ 유지 관리 기간이 해제되어 있습니다.
+ Automation 워크플로가 성공적으로 완료되었습니다. Automation은 AWS Systems Manager의 도구입니다.
+ 관리형 노드가 패치 규정을 준수하지 않습니다.
+ 파라미터 값을 업데이트 중입니다.

EventBridge는 다음 AWS Systems Manager 도구의 이벤트를 지원합니다.
+ JIT(Just-in-Time) 노드 액세스(이벤트는 최선의 방식으로 전송됨).
+ Automation(이벤트가 최선의 작업을 기반으로 발생.)
+ Change Calendar(이벤트는 최선의 작업을 기반으로 발생됩니다.)
+ 규정 준수
+ Inventory(이벤트는 최선의 작업을 기반으로 발생됩니다.)
+ Maintenance Windows(이벤트는 최선의 작업을 기반으로 발생됩니다.)
+ Parameter Store(이벤트는 최선의 작업을 기반으로 발생됩니다.)
+ Run Command(이벤트는 최선의 작업을 기반으로 발생됩니다.)
+ State Manager(이벤트는 최선의 작업을 기반으로 발생됩니다.)

지원되는 Systems Manager 이벤트 유형에 대한 자세한 내용은 [참조: Systems Manager용 Amazon EventBridge 이벤트 패턴 및 유형](reference-eventbridge-events.md) 및 [Systems Manager에 대한 Amazon EventBridge 이벤트 예](monitoring-systems-manager-event-examples.md) 섹션을 참조하세요.

**지원되는 Systems Manager 대상 유형**  
EventBridge는 이벤트 규칙의 대상으로 다음 3가지 Systems Manager 도구를 지원합니다.
+ Automation 워크플로 실행
+ Run Command Command 문서 실행(최선의 작업을 기반으로 이벤트 방출)
+ OpsCenter OpsItem 생성

이러한 대상을 사용할 수 있는 권장 방법은 [샘플 시나리오: Amazon EventBridge 규칙의 Systems Manager 대상](monitoring-systems-manager-targets.md) 섹션을 참조하세요.

EventBridge 시작 및 규칙 설정 방법에 대한 자세한 내용은 *Amazon EventBridge 사용 설명서*의 [Amazon EventBridge 시작하기](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-get-started.html)를 참조하세요. EventBridge 작업에 대한 전체 내용은 [https://docs.aws.amazon.com/eventbridge/latest/userguide/](https://docs.aws.amazon.com/eventbridge/latest/userguide/)를 참조하세요.

**Topics**
+ [Systems Manager 이벤트에 대해 EventBridge 구성](monitoring-systems-manager-events.md)
+ [Systems Manager에 대한 Amazon EventBridge 이벤트 예](monitoring-systems-manager-event-examples.md)
+ [샘플 시나리오: Amazon EventBridge 규칙의 Systems Manager 대상](monitoring-systems-manager-targets.md)

# Systems Manager 이벤트에 대해 EventBridge 구성
<a name="monitoring-systems-manager-events"></a>

Amazon EventBridge를 사용하여 지원되는 AWS Systems Manager 상태 변경, 상태 변경 또는 기타 조건이 발생할 때 대상 이벤트를 수행할 수 있습니다. 상태가 달라질 때마다 또는 관심이 있는 상태로 변경될 때 실행되는 규칙을 만들면 됩니다.

다음 절차에서는 Systems Manager가 지정된 이벤트를 발생시킬 때 적용되는 EventBridge 규칙을 생성하는 일반적인 단계를 제공합니다. 이 사용 설명서에서 특정 시나리오를 다루는 절차에 대한 목록은 이 주제 끝부분의 **추가 정보**를 참조하세요.

**참고**  
AWS 계정의 서비스가 이벤트를 출력하면 항상 계정의 기본 이벤트 버스로 이동합니다. 계정의 AWS 서비스에서 이벤트에 응답하는 규칙을 작성하려면 기본 이벤트 버스와 연결합니다. AWS 서비스의 이벤트를 찾는 사용자 정의 이벤트 버스에서 규칙을 생성할 수 있지만, 이 규칙은 크로스 계정 이벤트 제공을 통해 다른 계정에서 이러한 이벤트를 수신할 때만 적용됩니다. 자세한 내용은 *Amazon EventBridge 사용 설명서*의 [AWS 계정 간 이벤트 전송 및 수신](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-account.html)을 참조하세요.

**Systems Manager 이벤트에 대해 EventBridge를 구성하려면**

1. [https://console.aws.amazon.com/events/](https://console.aws.amazon.com/events/)에서 Amazon EventBridge 콘솔을 엽니다.

1. 탐색 창에서 **규칙**을 선택합니다.

1. **규칙 생성**을 선택합니다.

1. 규칙에 대해 이름과 설명을 입력하세요.

   규칙은 동일한 AWS 리전과 동일한 이벤트 버스의 다른 규칙과 동일한 이름을 가질 수 없습니다.

1. **이벤트 버스**에서 이 규칙과 연결할 이벤트 버스를 선택합니다. 이 규칙이 자신의 AWS 계정에서 오는 일치하는 이벤트에 응답하도록 하려면 **default**(기본)를 선택합니다. 계정의 AWS 서비스이(가) 이벤트를 출력하면 항상 계정의 기본 이벤트 버스로 이동합니다.

1. **규칙 유형**에서 **이벤트 패턴이 있는 규칙**을 선택합니다.

1. **다음**을 선택합니다.

1. **이벤트 소스(Event source)**에서 **AWS 이벤트 또는 EventBridge 파트너 이벤트(Events or EventBridge partner events)**를 선택합니다.

1. **이벤트 패턴(Event pattern)**섹션에서 **이벤트 패턴 양식(Event pattern form)**을 선택합니다.

1. **이벤트 소스**에서 **AWS 서비스**를 선택합니다.

1. **AWS service**(서비스)에서 **Systems Manager**를 선택합니다.

1. **이벤트 유형(Event type)**에서 다음 중 하나를 수행합니다.
   + **모든 이벤트(All Events)**를 선택합니다.

     **모든 이벤트(All Events)**를 선택하면 Systems Manager에서 출력한 모든 이벤트가 규칙과 일치합니다. 이 옵션을 사용하면 많은 이벤트 대상 작업이 발생할 수 있습니다.
   + 이 규칙에 사용할 Systems Manager 이벤트의 유형을 선택합니다. EventBridge는 다음 AWS Systems Manager 도구의 이벤트를 지원합니다.
     + 자동화
     + Change Calendar
     + 규정 준수
     + 인벤토리
     + Maintenance Windows
     + Parameter Store
     + Run Command
     + State Manager
**참고**  
EventBridge에서 지원하지 않는 Systems Manager 작업의 경우 CloudTrail을 통해 AWS API 호출을 선택하여 CloudTrail에서 기록하는 API 호출을 기반으로 하는 이벤트 규칙을 생성할 수 있습니다. 문제 해결 예는 [Amazon EventBridge를 사용하여 세션 활동 모니터링(콘솔)](session-manager-auditing.md#session-manager-auditing-eventbridge-events)을(를) 참조하세요.

1. (선택 사항) 규칙을 더 구체적으로 만들려면 필터 값을 추가합니다. 예를 들어 **State Manager**을(를) 선택하고 연결의 대상이 되는 단일 관리형 인스턴스의 상태로 규칙을 제한하려는 경우 **Specific type(s)**(특정 유형)에서 **EC2 State Manager Instance Association State Change**(EC2 상태 관리자 인스턴스 연결 상태 변경)를 선택합니다.

   지원되는 세부 유형에 대한 자세한 내용은 [참조: Systems Manager용 Amazon EventBridge 이벤트 패턴 및 유형](reference-eventbridge-events.md) 섹션을 참조하세요.

   일부 상세 유형에는 상태와 같은 다른 지원 옵션이 있습니다. 사용 가능한 옵션은 선택한 도구에 따라 다릅니다.

1. **다음**을 선택합니다.

1. **대상 유형**에서 **AWS서비스**를 선택합니다.

1. **대상 선택**에서 Amazon SNS 주제 또는 AWS Lambda 함수와 같은 대상을 선택합니다. 규칙에 정의된 이벤트 패턴과 일치하는 이벤트를 수신할 때 대상이 트리거됩니다.

1. 여러 대상 유형에 대해 EventBridge에서는 대상에 이벤트를 보낼 권한이 필요합니다. 이 경우 EventBridge는 이벤트 실행에 필요한 AWS Identity and Access Management(IAM) 역할을 생성할 수 있습니다.
   + IAM 역할을 자동으로 생성하려면 **이 특정 리소스에 대해 새 역할 생성**을 선택합니다.
   + 이전에 생성한 IAM 역할을 사용하려면 **기존 역할 사용(Use existing role)**을 선택합니다.

1. (선택 사항) 이 규칙에 다른 대상을 추가하려면 **Add another target**(다른 대상 추가)을 선택합니다.

1. **다음**을 선택합니다.

1. (선택 사항)규칙에 대해 하나 이상의 태그를 입력하세요. 자세한 정보는 *Amazon EventBridge 사용 설명서*의 [Amazon EventBridge 태그](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-tagging.html)를 참조하세요.

1. **다음**을 선택합니다.

1. 규칙의 세부 정보를 검토하고 **규칙 생성**을 선택합니다.

**추가 정보**  
+ [실행서를 사용하는 EventBridge 이벤트 생성(콘솔)](running-automations-event-bridge.md#automation-cwe-target-console)
+ [입력 변환기를 사용하여 Automation에 데이터 전달](automation-tutorial-eventbridge-input-transformers.md)
+ [EventBridge를 사용하여 규정 준수 문제 해결](compliance-fixing.md)
+ [EventBridge에서 인벤토리 삭제 작업 보기](inventory-custom.md#delete-custom-inventory-cwe)
+ [OpsItems를 생성하도록 EventBridge 규칙 구성](OpsCenter-automatically-create-OpsItems-2.md)
+ [파라미터 및 파라미터 정책에 대해 EventBridge 구성](sysman-paramstore-cwe.md#cwe-parameter-changes)

# Systems Manager에 대한 Amazon EventBridge 이벤트 예
<a name="monitoring-systems-manager-event-examples"></a>

다음은 AWS Systems Manager에 대해 지원되는 EventBridge 이벤트의 JSON 형식 예입니다.

**Topics**
+ [AWS Systems Manager Automation 이벤트](#SSM-Automation-event-types)
+ [AWS Systems Manager이벤트Change Calendar](#SSM-Change-Management-event-types)
+ [AWS Systems Manager이벤트Change Manager](#SSM-Change-Manager-event-types)
+ [AWS Systems Manager Compliance 이벤트](#SSM-Configuration-Compliance-event-types)
+ [AWS Systems Manager이벤트Maintenance Windows](#EC2_maintenance_windows_event_types)
+ [AWS Systems Manager이벤트Parameter Store](#SSM-Parameter-Store-event-types)
+ [AWS Systems Manager이벤트OpsCenter](#SSM-OpsCenter-event-types)
+ [AWS Systems Manager이벤트Run Command](#SSM-Run-Command-event-types)
+ [AWS Systems Manager이벤트State Manager](#SSM-State-Manager-event-types)

## AWS Systems Manager Automation 이벤트
<a name="SSM-Automation-event-types"></a>

**자동화 단계 상태 변경 알림**

```
{
  "version": "0",
  "id": "eeca120b-a321-433e-9635-dab369006a6b",
  "detail-type": "EC2 Automation Step Status-change Notification",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-11-29T19:43:35Z",
  "region": "us-east-1",
  "resources": ["arn:aws:ssm:us-east-2:123456789012:automation-execution/333ba70b-2333-48db-b17e-a5e69c6f4d1c", 
    "arn:aws:ssm:us-east-2:123456789012:automation-definition/runcommand1:1"],
  "detail": {
    "ExecutionId": "333ba70b-2333-48db-b17e-a5e69c6f4d1c",
    "Definition": "runcommand1",
    "DefinitionVersion": 1.0,
    "Status": "Success",
    "EndTime": "Nov 29, 2024 7:43:25 PM",
    "StartTime": "Nov 29, 2024 7:43:23 PM",
    "Time": 2630.0,
    "StepName": "runFixedCmds",
    "Action": "aws:runCommand"
  }
}
```

**자동화 실행 상태 변경 알림**

```
{
  "version": "0",
  "id": "d290ece9-1088-4383-9df6-cd5b4ac42b99",
  "detail-type": "EC2 Automation Execution Status-change Notification",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-11-29T19:43:35Z",
  "region": "us-east-2",
  "resources": ["arn:aws:ssm:us-east-2:123456789012:automation-execution/333ba70b-2333-48db-b17e-a5e69c6f4d1c", 
    "arn:aws:ssm:us-east-2:123456789012:automation-definition/runcommand1:1"],
  "detail": {
    "ExecutionId": "333ba70b-2333-48db-b17e-a5e69c6f4d1c",
    "Definition": "runcommand1",
    "DefinitionVersion": 1.0,
    "Status": "Success",
    "StartTime": "Nov 29, 2024 7:43:20 PM",
    "EndTime": "Nov 29, 2024 7:43:26 PM",
    "Time": 5753.0,
    "ExecutedBy": "arn:aws:iam::123456789012:user/userName"
  }
}
```

## AWS Systems Manager이벤트Change Calendar
<a name="SSM-Change-Management-event-types"></a>

이 주제의 정보를 사용하여 AWS Systems Manager Change Calendar에 대한 EventBridge 이벤트의 동작을 계획하고 이해합니다.

**참고**  
다른 AWS 계정에서 공유된 일정의 상태 변경은 현재 지원되지 않습니다.

### Amazon EventBridge과 Change Calendar 통합
<a name="change-calendar-eventbridge-integration"></a>

AWS Systems Manager Change Calendar는 Amazon EventBridge와 통합되어 일정 상태 변경을 알립니다. 기본 예약 아키텍처와 관련된 다음 동작에 유의하세요.

이벤트 타이밍 및 신뢰성  
+ EventBridge는 최대 15분의 예약 허용 오차로 최대한 알림을 전송합니다.
+ 상태 변경 이벤트는 개별 일정 이벤트가 아닌 전체 일정 상태 전환을 반영합니다.
+ 여러 일정 이벤트가 동시에 발생하면 EventBridge는 실제 일정 상태 변경당 하나의 이벤트만 생성합니다.
+ EventBridge는 일정의 전체 상태가 전환될 때만(예: 종결에서 열림으로 전환) 이벤트를 트리거하며, 상태 변경을 초래하지 않는 개별 일정 이벤트에 대해서는 트리거하지 않습니다.
+ 일정 상태를 수정하지 않는 공지 이벤트는 EventBridge 알림을 트리거하지 않습니다.

이벤트 수정 및 타이밍 고려 사항  
+ 예약된 시작 또는 종료 시간으로부터 15분 이내에 일정 이벤트를 수정하면 EventBridge가 중복 알림을 생성하거나 알림을 보내지 않을 수 있습니다.
+ 이 동작은 예약 시스템에서 이전에 예약된 알림을 올바르게 업데이트하거나 취소할 시간이 충분하지 않기 때문에 발생할 수 있습니다.
+ 반복 이벤트의 경우 이 동작은 일반적으로 수정 후 첫 번째 발생에만 영향을 줍니다.

인접 이벤트 및 중첩 이벤트  
+ 일정 이벤트가 서로 5분 이내에 예약되면 실제 상태 변경에 따라 상태 전환 이벤트가 발생하거나 발생하지 않을 수 있습니다.
+ 특정 순서로 중복 이벤트를 생성하면 실제 상태 변경이 발생하지 않더라도 추가 EventBridge 이벤트를 생성할 수 있습니다.
+ 예측 가능한 동작을 보장하려면 실행 시간에 가까운 일정 이벤트를 생성하거나 수정하지 않습니다.

모범 사례  
+ 잠재적 중복 이벤트를 처리하도록 EventBridge 규칙 및 다운스트림 자동화를 설계합니다.
+ 중복 알림으로 인한 문제를 방지하도록 자동화 워크플로에서 멱등성을 구현합니다.
+ 일정 이벤트를 생성하거나 수정하는 경우 충분한 리드 타임(최소 15분)을 허용합니다.
+ 특정 일정 이벤트 패턴과 함께 EventBridge 통합을 철저히 테스트합니다.

**일정 OPEN**

```
{
    "version": "0",
    "id": "47a3f03a-f30d-1011-ac9a-du3bdEXAMPLE",
    "detail-type": "Calendar State Change",
    "source": "aws.ssm",
    "account": "123456789012",
    "time": "2024-09-19T18:00:07Z",
    "region": "us-east-2",
    "resources": [
        "arn:aws:ssm:us-east-2:123456789012:document/MyCalendar"
    ],
    "detail": {
        "state": "OPEN",
        "atTime": "2024-09-19T18:00:07Z",
        "nextTransitionTime": "2024-10-11T18:00:07Z"
    }
}
```

**일정 CLOSED**

```
{
    "version": "0",
    "id": "f30df03a-1011-ac9a-47a3-f761eEXAMPLE",
    "detail-type": "Calendar State Change",
    "source": "aws.ssm",
    "account": "123456789012",
    "time": "2024-09-17T21:40:02Z",
    "region": "us-east-2",
    "resources": [
        "arn:aws:ssm:us-east-2:123456789012:document/MyCalendar"
    ],
    "detail": {
        "state": "CLOSED",
        "atTime": "2024-08-17T21:40:00Z",
        "nextTransitionTime": "2024-09-19T18:00:07Z"
    }
}
```

## AWS Systems Manager이벤트Change Manager
<a name="SSM-Change-Manager-event-types"></a>

**변경 요청 상태 업데이트 알림 - 예제 1**

```
{
  "version": "0",
  "id": "feab80c1-a8ff-c721-b8b1-96ce70939696",
  "detail-type": "Change Request Status Update",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-10-24T10:51:52Z",
  "region": "us-east-1",
  "resources": [
    "arn:aws:ssm:us-west-2:123456789012:opsitem/oi-12345abcdef",
    "arn:aws:ssm:us-west-2:123456789012:document/MyRunbook1"
  ],
  "detail": {
    "change-request-id": "d0585556-80f6-4522-8dad-dada6d45b67d",
    "change-request-title": "A change request title",
    "ops-item-id": "oi-12345abcdef",
    "ops-item-created-by": "arn:aws:iam::123456789012:user/JohnDoe",
    "ops-item-created-time": "2024-10-24T10:50:33.180334Z",
    "ops-item-modified-by": "arn:aws:iam::123456789012:user/JohnDoe",
    "ops-item-modified-time": "2024-10-24T10:50:33.180340Z",
    "ops-item-status": "InProgress",
    "change-template-document-name": "MyChangeTemplate",
    "runbook-document-arn": "arn:aws:ssm:us-west-2:123456789012:document/MyRunbook1",
    "runbook-document-version": "1",
    "auto-approve": true,
    "approvers": [
      "arn:aws:iam::123456789012:user/JaneDoe"
    ]
  }
}
```

**변경 요청 상태 업데이트 알림 - 예제 2**

```
{
  "version": "0",
  "id": "25ce6b03-2e4e-1a2b-2a8f-6c9de8d278d2",
  "detail-type": "Change Request Status Update",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-10-24T10:51:52Z",
  "region": "us-east-1",
  "resources": [
    "arn:aws:ssm:us-west-2:123456789012:opsitem/oi-abcdef12345",
    "arn:aws:ssm:us-west-2:123456789012:document/MyRunbook1"
  ],
  "detail": {
    "change-request-id": "d0585556-80f6-4522-8dad-dada6d45b67d",
    "change-request-title": "A change request title",
    "ops-item-id": "oi-abcdef12345",
    "ops-item-created-by": "arn:aws:iam::123456789012:user/JohnDoe",
    "ops-item-created-time": "2024-10-24T10:50:33.180334Z",
    "ops-item-modified-by": "arn:aws:iam::123456789012:user/JohnDoe",
    "ops-item-modified-time": "2024-10-24T10:50:33.997163Z",
    "ops-item-status": "Rejected",
    "change-template-document-name": "MyChangeTemplate",
    "runbook-document-arn": "arn:aws:ssm:us-west-2:123456789012:document/MyRunbook1",
    "runbook-document-version": "1",
    "auto-approve": true,
    "approvers": [
      "arn:aws:iam::123456789012:user/JaneDoe"
    ]
  }
}
```

## AWS Systems Manager Compliance 이벤트
<a name="SSM-Configuration-Compliance-event-types"></a>

다음은 AWS Systems Manager Compliance의 예입니다.

**연결 규정 준수**

```
{
  "version": "0",
  "id": "01234567-0123-0123-0123-012345678901",
  "detail-type": "Configuration Compliance State Change",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-07-17T19:03:26Z",
  "region": "us-east-2",
  "resources": [
    "arn:aws:ssm:us-east-2:123456789012:managed-instance/i-01234567890abcdef"
  ],
  "detail": {
    "last-runtime": "2024-01-01T10:10:10Z",
    "compliance-status": "compliant",
    "resource-type": "managed-instance",
    "resource-id": "i-01234567890abcdef",
    "compliance-type": "Association"
  }
}
```

**연결 규정 미준수**

```
{
  "version": "0",
  "id": "01234567-0123-0123-0123-012345678901",
  "detail-type": "Configuration Compliance State Change",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-07-17T19:02:31Z",
  "region": "us-east-2",
  "resources": [
    "arn:aws:ssm:us-east-2:123456789012:managed-instance/i-01234567890abcdef"
  ],
  "detail": {
    "last-runtime": "2024-01-01T10:10:10Z",
    "compliance-status": "non_compliant",
    "resource-type": "managed-instance",
    "resource-id": "i-01234567890abcdef",
    "compliance-type": "Association"
  }
}
```

**패치 규정 준수**

```
{
  "version": "0",
  "id": "01234567-0123-0123-0123-012345678901",
  "detail-type": "Configuration Compliance State Change",
  "source": "aws.123456789012",
  "account": "123456789012",
  "time": "2024-07-17T19:03:26Z",
  "region": "us-east-2",
  "resources": [
    "arn:aws:ssm:us-east-2:123456789012:managed-instance/i-01234567890abcdef"
  ],
  "detail": {
    "resource-type": "managed-instance",
    "resource-id": "i-01234567890abcdef",
    "compliance-status": "compliant",
    "compliance-type": "Patch",
    "patch-baseline-id": "PB789",
    "severity": "critical"
  }
}
```

**패치 규정 미준수**

```
{
  "version": "0",
  "id": "01234567-0123-0123-0123-012345678901",
  "detail-type": "Configuration Compliance State Change",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-07-17T19:02:31Z",
  "region": "us-east-2",
  "resources": [
    "arn:aws:ssm:us-east-2:123456789012:managed-instance/i-01234567890abcdef"
  ],
  "detail": {
    "resource-type": "managed-instance",
    "resource-id": "i-01234567890abcdef",
    "compliance-status": "non_compliant",
    "compliance-type": "Patch",
    "patch-baseline-id": "PB789",
    "severity": "critical"
  }
}
```

## AWS Systems Manager이벤트Maintenance Windows
<a name="EC2_maintenance_windows_event_types"></a>

다음은 Systems Manager Maintenance Windows 이벤트의 예입니다.

**대상 등록**

유효한 상태 값에는 `REGISTERED`, `DEREGISTERED` 등이 있습니다.

```
{
   "version":"0",
   "id":"01234567-0123-0123-0123-0123456789ab",
   "detail-type":"Maintenance Window Target Registration Notification",
   "source":"aws.ssm",
   "account":"123456789012",
   "time":"2024-11-16T00:58:37Z",
   "region":"us-east-2",
   "resources":[
      "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-0ed7251d3fcf6e0c2",
      "arn:aws:ssm:us-east-2:123456789012:windowtarget/e7265f13-3cc5-4f2f-97a9-7d3ca86c32a6"
   ],
   "detail":{
      "window-target-id":"e7265f13-3cc5-4f2f-97a9-7d3ca86c32a6",
      "window-id":"mw-0ed7251d3fcf6e0c2",
      "status":"REGISTERED"
   }
}
```

**Window 실행 유형**

유효한 상태 값에는 다음이 포함됩니다.
+ `CANCELLED`
+ `CANCELLING`
+ `FAILED`
+ `IN_PROGRESS`
+ `PENDING`
+ `SKIPPED_OVERLAPPING`
+ `SUCCESS TIMED_OUT`

```
{
   "version":"0",
   "id":"01234567-0123-0123-0123-0123456789ab",
   "detail-type":"Maintenance Window Execution State-change Notification",
   "source":"aws.ssm",
   "account":"123456789012",
   "time":"2025-06-02T14:52:18Z",
   "region":"us-east-2",
   "resources":[
      "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-0c50858d01EXAMPLE"
   ],
   "detail":{
      "start-time":"2025-06-02T14:48:28.039273Z",
      "end-time":"2025-06-02T14:52:18.083773Z",
      "window-id":"mw-0ed7251d3fcf6e0c2",
      "window-execution-id":"14bea65d-5ccc-462d-a2f3-e99c8EXAMPLE",
      "status":"SUCCESS"
   }
}
```

**작업 실행 유형**

유효한 상태 값에는 `IN_PROGRESS`, `SUCCESS`, `FAILED`, `TIMED_OUT` 등이 있습니다.

```
{
   "version":"0",
   "id":"01234567-0123-0123-0123-0123456789ab",
   "detail-type":"Maintenance Window Task Execution State-change Notification",
   "source":"aws.ssm",
   "account":"123456789012",
   "time":"2025-06-02T14:52:18Z",
   "region":"us-east-2",
   "resources":[
      "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-0c50858d01EXAMPLE"
   ],
   "detail":{
      "start-time":"2025-06-02T14:48:28.039273Z",
      "task-execution-id":"6417e808-7f35-4d1a-843f-123456789012",
      "end-time":"2025-06-02T14:52:18.083773Z",
      "window-id":"mw-0ed7251d3fcf6e0c2",
      "window-execution-id":"14bea65d-5ccc-462d-a2f3-e99c8EXAMPLE",
      "status":"SUCCESS"
   }
}
```

**처리된 작업 대상**

유효한 상태 값에는 `IN_PROGRESS`, `SUCCESS`, `FAILED`, `TIMED_OUT` 등이 있습니다.

```
{
   "version":"0",
   "id":"01234567-0123-0123-0123-0123456789ab",
   "detail-type":"Maintenance Window Task Target Invocation State-change Notification",
   "source":"aws.ssm",
   "account":"123456789012",
   "time":"2025-06-02T14:52:18Z",
   "region":"us-east-2",
   "resources":[
      "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-123456789012345678"
   ],
   "detail":{
      "start-time":"2025-06-02T14:48:28.039273Z",
      "end-time":"2025-06-02T14:52:18.083773Z",
      "window-id":"mw-0ed7251d3fcf6e0c2",
      "window-execution-id":"791b72e0-f0da-4021-8b35-f95dfEXAMPLE",
      "task-execution-id":"c9b05aba-197f-4d8d-be34-e73fbEXAMPLE",
      "window-target-id":"e32eecb2-646c-4f4b-8ed1-205fbEXAMPLE",
      "status":"SUCCESS",
      "owner-information":"Owner"
   }
}
```

**기간 상태 변경**

유효한 상태 값에는 `ENABLED`, `DISABLED` 등이 있습니다.

```
{
   "version":"0",
   "id":"01234567-0123-0123-0123-0123456789ab",
   "detail-type":"Maintenance Window State-change Notification",
   "source":"aws.ssm",
   "account":"123456789012",
   "time":"2024-11-16T00:58:37Z",
   "region":"us-east-2",
   "resources":[
      "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-0c50858d01EXAMPLE"
   ],
   "detail":{
      "window-id":"mw-0c50858d01EXAMPLE",
      "status":"DISABLED"
   }
}
```

## AWS Systems Manager이벤트Parameter Store
<a name="SSM-Parameter-Store-event-types"></a>

다음은 Systems Manager Parameter Store 이벤트의 예입니다.

**파라미터 생성**

```
{
  "version": "0",
  "id": "6a7e4feb-b491-4cf7-a9f1-bf3703497718",
  "detail-type": "Parameter Store Change",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-05-22T16:43:48Z",
  "region": "us-east-2",
  "resources": [
    "arn:aws:ssm:us-east-2:123456789012:parameter/MyExampleParameter"
  ],
  "detail": {
    "operation": "Create",
    "name": "MyExampleParameter",
    "type": "String",
    "description": "Sample Parameter"
  }
}
```

**파라미터 업데이트**

```
{
  "version": "0",
  "id": "9547ef2d-3b7e-4057-b6cb-5fdf09ee7c8f",
  "detail-type": "Parameter Store Change",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-05-22T16:44:48Z",
  "region": "us-east-2",
  "resources": [
    "arn:aws:ssm:us-east-2:123456789012:parameter/MyExampleParameter"
  ],
  "detail": {
    "operation": "Update",
    "name": "MyExampleParameter",
    "type": "String",
    "description": "Sample Parameter"
  }
}
```

**파라미터 삭제**

```
{
  "version": "0",
  "id": "80e9b391-6a9b-413c-839a-453b528053af",
  "detail-type": "Parameter Store Change",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-05-22T16:45:48Z",
  "region": "us-east-2",
  "resources": [
    "arn:aws:ssm:us-east-2:123456789012:parameter/MyExampleParameter"
  ],
  "detail": {
    "operation": "Delete",
    "name": "MyExampleParameter",
    "type": "String",
    "description": "Sample Parameter"
  }
}
```

## AWS Systems Manager이벤트OpsCenter
<a name="SSM-OpsCenter-event-types"></a>

**OpsCenter OpsItem 알림 생성**

```
{
  "version": "0",
  "id": "aae66adc-7aac-f0c0-7854-7691e8c079b8",
  "detail-type": "OpsItem Create",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-10-19T02:48:11Z",
  "region": "us-east-1",
  "resources": [
    "arn:aws:ssm:us-west-2:123456789012:opsitem/oi-123456abcdef"
  ],
  "detail": {
    "created-by": "arn:aws:iam::123456789012:user/JohnDoe",
    "created-time": "2024-10-19T02:46:53.629361Z",
    "source": "aws.ssm",
    "status": "Open",
    "ops-item-id": "oi-123456abcdef",
    "title": "An issue title",
    "ops-item-type": "/aws/issue",
    "description": "A long description may appear here"
  }
}
```

**OpsCenter OpsItem 업데이트 알림**

```
{
  "version": "0",
  "id": "2fb5b168-b725-41dd-a890-29311200089c",
  "detail-type": "OpsItem Update",
  "source": "aws.ssm",
  "account": "123456789012",
  "time": "2024-10-19T02:48:11Z",
  "region": "us-east-1",
  "resources": [
    "arn:aws:ssm:us-west-2:123456789012:opsitem/oi-123456abcdef"
  ],
  "detail": {
    "created-by": "arn:aws:iam::123456789012:user/JohnDoe",
    "created-time": "2024-10-19T02:46:54.049271Z",
    "modified-by": "arn:aws:iam::123456789012:user/JohnDoe",
    "modified-time": "2024-10-19T02:46:54.337354Z",
    "source": "aws.ssm",
    "status": "Open",
    "ops-item-id": "oi-123456abcdef",
    "title": "An issue title",
    "ops-item-type": "/aws/issue",
    "description": "A long description may appear here"
  }
}
```

## AWS Systems Manager이벤트Run Command
<a name="SSM-Run-Command-event-types"></a>

**Run Command 상태 변경 알림**

```
{
    "version": "0",
    "id": "51c0891d-0e34-45b1-83d6-95db273d1602",
    "detail-type": "EC2 Command Status-change Notification",
    "source": "aws.ssm",
    "account": "123456789012",
    "time": "2024-07-10T21:51:32Z",
    "region": "us-east-2",
    "resources": ["arn:aws:ec2:us-east-2:123456789012:instance/i-02573cafcfEXAMPLE"],
    "detail": {
        "command-id": "e8d3c0e4-71f7-4491-898f-c9b35bee5f3b",
        "document-name": "AWS-RunPowerShellScript",
        "expire-after": "2024-07-14T22:01:30.049Z",
        "parameters": {
            "executionTimeout": ["3600"],
            "commands": ["date"]
        },
        "requested-date-time": "2024-07-10T21:51:30.049Z",
        "status": "Success"
    }
}
```

**Run Command 호출 상태 변경 알림**

```
{
    "version": "0",
    "id": "4780e1b8-f56b-4de5-95f2-95dbEXAMPLE",
    "detail-type": "EC2 Command Invocation Status-change Notification",
    "source": "aws.ssm",
    "account": "123456789012",
    "time": "2024-07-10T21:51:32Z",
    "region": "us-east-2",
    "resources": ["arn:aws:ec2:us-east-2:123456789012:instance/i-02573cafcfEXAMPLE"],
    "detail": {
        "command-id": "e8d3c0e4-71f7-4491-898f-c9b35bee5f3b",
        "document-name": "AWS-RunPowerShellScript",
        "instance-id": "i-02573cafcfEXAMPLE",
        "requested-date-time": "2024-07-10T21:51:30.049Z",
        "status": "Success"
    }
}
```

## AWS Systems Manager이벤트State Manager
<a name="SSM-State-Manager-event-types"></a>

**State Manager 연결 상태 변경**

```
{
   "version":"0",
   "id":"db839caf-6f6c-40af-9a48-25b2ae2b7774",
   "detail-type":"EC2 State Manager Association State Change",
   "source":"aws.ssm",
   "account":"123456789012",
   "time":"2024-05-16T23:01:10Z",
   "region":"us-east-2",
   "resources":[
      "arn:aws:ssm:us-east-2::document/AWS-RunPowerShellScript"
   ],
   "detail":{
      "association-id":"6e37940a-23ba-4ab0-9b96-5d0a1a05464f",
      "document-name":"AWS-RunPowerShellScript",
      "association-version":"1",
      "document-version":"Optional.empty",
      "targets":"[{\"key\":\"InstanceIds\",\"values\":[\"i-12345678\"]}]",
      "creation-date":"2024-02-13T17:22:54.458Z",
      "last-successful-execution-date":"2024-05-16T23:00:01Z",
      "last-execution-date":"2024-05-16T23:00:01Z",
      "last-updated-date":"2024-02-13T17:22:54.458Z",
      "status":"Success",
      "association-status-aggregated-count":"{\"Success\":1}",
      "schedule-expression":"cron(0 */30 * * * ? *)",
      "association-cwe-version":"1.0"
   }
}
```

**State Manager 인스턴스 연결 상태 변경**

```
{
   "version":"0",
   "id":"6a7e8feb-b491-4cf7-a9f1-bf3703467718",
   "detail-type":"EC2 State Manager Instance Association State Change",
   "source":"aws.ssm",
   "account":"123456789012",
   "time":"2024-02-23T15:23:48Z",
   "region":"us-east-2",
   "resources":[
      "arn:aws:ec2:us-east-2:123456789012:instance/i-12345678",
      "arn:aws:ssm:us-east-2:123456789012:document/my-custom-document"
   ],
   "detail":{
      "association-id":"34fcb7e0-9a14-4984-9989-0e04e3f60bd8",
      "instance-id":"i-02573cafcfEXAMPLE",
      "document-name":"my-custom-document",
      "document-version":"1",
      "targets":"[{\"key\":\"instanceids\",\"values\":[\"i-02573cafcfEXAMPLE\"]}]",
      "creation-date":"2024-02-23T15:23:48Z",
      "last-successful-execution-date":"2024-02-23T16:23:48Z",
      "last-execution-date":"2024-02-23T16:23:48Z",
      "status":"Success",
      "detailed-status":"",
      "error-code":"testErrorCode",
      "execution-summary":"testExecutionSummary",
      "output-url":"sampleurl",
      "instance-association-cwe-version":"1"
   }
}
```

# 샘플 시나리오: Amazon EventBridge 규칙의 Systems Manager 대상
<a name="monitoring-systems-manager-targets"></a>

Amazon EventBridge 규칙에서 호출할 대상을 지정할 때 20개 이상의 대상 유형 중에서 선택하고 각 규칙에 최대 5개의 대상을 추가할 수 있습니다.

다양한 대상 중 EventBridge 이벤트 발생 시 대상 동작으로 AWS Systems Manager의 도구인 Automation, OpsCenter 및 Run Command 중에서 선택할 수 있습니다.

다음은 이러한 도구를 EventBridge 규칙의 대상으로 사용할 수 있는 방법의 몇 가지 예제입니다.

**Automation 예**  
다음과 같은 이벤트가 발생할 때 Automation 워크플로를 시작하도록 EventBridge 규칙을 구성할 수 있습니다.
+ Amazon CloudWatch 경보에서 관리형 노드가 상태 확인(`StatusCheckFailed_Instance=1`)에 실패했다고 보고하면 노드에서 `AWSSupport-ExecuteEC2Rescue` Automation 실행서를 실행합니다.
+ 새 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스가 실행 중이어서 `EC2 Instance State-change Notification` 이벤트가 발생하면 인스턴스에서 `AWS-AttachEBSVolume` Automation 실행서를 실행합니다.
+ Amazon Elastic Block Store(Amazon EBS) 볼륨을 생성하고 사용할 수 있는 볼륨이 생성되어 사용 가능하게 되면 해당 볼륨에서 `AWS-CreateSnapshot` Automation 실행서를 실행합니다.

**OpsCenter 예제**  
다음과 같은 인시던트가 발생할 때 새 OpsItem을 생성하도록 EventBridge 규칙을 구성할 수 있습니다.
+ Amazon DynamoDB에 대한 제한 이벤트가 발생하거나 Amazon EBS 볼륨 성능이 저하되었습니다.
+ Amazon EC2 Auto Scaling 그룹이 노드를 시작하지 못하거나 Systems Manager Automation 워크플로가 실패합니다.
+ EC2 인스턴스가 `Running`에서 `Stopped`로 상태를 변경합니다.

**Run Command 예제**  
다음과 같은 이벤트가 발생할 때 Run Command에서 Systems Manager Command 문서를 실행하도록 EventBridge 규칙을 구성할 수 있습니다.
+ Auto Scaling 그룹이 종료될 때 Run Command 스크립트는 종료되기 전에 노드에서 로그 파일을 캡처할 수 있습니다.
+ Auto Scaling 그룹에 새 노드가 생성될 때 Run Command 대상 작업은 웹 서버 역할을 설정하거나 노드에 소프트웨어를 설치할 수 있습니다.
+ 관리형 노드가 규정을 준수하지 않는 것으로 확인되면 Run Command 대상 작업은 `AWS-RunPatchBaseline` 문서를 실행하여 노드의 패치를 업데이트할 수 있습니다.