

# EventBridge 이벤트 메시지 구조
<a name="ev-events"></a>

이벤트를 게시하기 위해 Amazon S3이 전송하는 알림 메시지는 JSON 형식입니다. Amazon S3가 이벤트를 Amazon EventBridge로 전송하는 경우 때 다음 필드가 있습니다.
+ `version` – 현재 모든 이벤트에 대해 0(영)입니다.
+ `id` – 모든 이벤트에 대해 생성되는 UUID입니다.
+ `detail-type` – 전송 중인 이벤트의 유형입니다. 이벤트 유형 목록은 [EventBridge 사용](EventBridge.md) 섹션을 참조하십시오.
+ `source` – 이벤트를 생성한 서비스를 식별합니다.
+ `account` – 버킷 소유자의 12자리 AWS 계정 ID입니다.
+ `time` - 이벤트가 발생한 시간입니다.
+ `region` – 버킷의 AWS 리전을 식별합니다.
+ `resources` – 버킷의 Amazon 리소스 이름(ARN)을 포함하는 JSON 배열입니다.
+ `detail` – 이벤트에 대한 정보를 포함하는 JSON 객체입니다. 이 필드에 포함될 수 있는 항목에 대한 자세한 내용은 [이벤트 메시지 세부 정보 필드](#ev-events-detail) 섹션을 참조하십시오.

## 이벤트 메시지 구조 예제
<a name="ev-events-list"></a>

다음은 Amazon EventBridge로 전송할 수 있는 일부 Amazon S3 이벤트 알림 메시지의 예입니다.

### 객체 생성됨(Object created)
<a name="ev-events-object-created"></a>

```
{
  "version": "0",
  "id": "17793124-05d4-b198-2fde-7ededc63b103",
  "detail-type": "Object Created",
  "source": "aws.s3",
  "account": "111122223333",
  "time": "2021-11-12T00:00:00Z",
  "region": "ca-central-1",
  "resources": [
    "arn:aws:s3:::amzn-s3-demo-bucket1"
  ],
  "detail": {
    "version": "0",
    "bucket": {
      "name": "amzn-s3-demo-bucket1"
    },
    "object": {
      "key": "example-key",
      "size": 5,
      "etag": "b1946ac92492d2347c6235b4d2611184",
      "version-id": "IYV3p45BT0ac8hjHg1houSdS1a.Mro8e",
      "sequencer": "617f08299329d189"
    },
    "request-id": "N4N7GDK58NMKJ12R",
    "requester": "123456789012",
    "source-ip-address": "1.2.3.4",
    "reason": "PutObject"
  }
}
```

### 객체 삭제됨(DeleteObject)(Object deleted (using DeleteObject))
<a name="ev-events-object-deleted"></a>

```
{
  "version": "0",
  "id": "2ee9cc15-d022-99ea-1fb8-1b1bac4850f9",
  "detail-type": "Object Deleted",
  "source": "aws.s3",
  "account": "111122223333",
  "time": "2021-11-12T00:00:00Z",
  "region": "ca-central-1",
  "resources": [
    "arn:aws:s3:::amzn-s3-demo-bucket1"
  ],
  "detail": {
    "version": "0",
    "bucket": {
      "name": "amzn-s3-demo-bucket1"
    },
    "object": {
      "key": "example-key",
      "etag": "d41d8cd98f00b204e9800998ecf8427e",
      "version-id": "1QW9g1Z99LUNbvaaYVpW9xDlOLU.qxgF",
      "sequencer": "617f0837b476e463"
    },
    "request-id": "0BH729840619AG5K",
    "requester": "123456789012",
    "source-ip-address": "1.2.3.4",
    "reason": "DeleteObject",
    "deletion-type": "Delete Marker Created"
  }
}
```

### 객체 삭제됨(수명 주기 만료)(Object deleted (using lifecycle expiration))
<a name="ev-events-object-deleted-lifecycle"></a>

```
{
  "version": "0",
  "id": "ad1de317-e409-eba2-9552-30113f8d88e3",
  "detail-type": "Object Deleted",
  "source": "aws.s3",
  "account": "111122223333",
  "time": "2021-11-12T00:00:00Z",
  "region": "ca-central-1",
  "resources": [
    "arn:aws:s3:::amzn-s3-demo-bucket1"
  ],
  "detail": {
    "version": "0",
    "bucket": {
      "name": "amzn-s3-demo-bucket1"
    },
    "object": {
      "key": "example-key",
      "etag": "d41d8cd98f00b204e9800998ecf8427e",
      "version-id": "mtB0cV.jejK63XkRNceanNMC.qXPWLeK",
      "sequencer": "617b398000000000"
    },
    "request-id": "20EB74C14654DC47",
    "requester": "s3.amazonaws.com",
    "reason": "Lifecycle Expiration",
    "deletion-type": "Delete Marker Created"
  }
}
```

### 객체 복원 완료됨(Object restore completed)
<a name="ev-events-object-restore-complete"></a>

```
{
  "version": "0",
  "id": "6924de0d-13e2-6bbf-c0c1-b903b753565e",
  "detail-type": "Object Restore Completed",
  "source": "aws.s3",
  "account": "111122223333",
  "time": "2021-11-12T00:00:00Z",
  "region": "ca-central-1",
  "resources": [
    "arn:aws:s3:::amzn-s3-demo-bucket1"
  ],
  "detail": {
    "version": "0",
    "bucket": {
      "name": "amzn-s3-demo-bucket1"
    },
    "object": {
      "key": "example-key",
      "size": 5,
      "etag": "b1946ac92492d2347c6235b4d2611184",
      "version-id": "KKsjUC1.6gIjqtvhfg5AdMI0eCePIiT3"
    },
    "request-id": "189F19CB7FB1B6A4",
    "requester": "s3.amazonaws.com",
    "restore-expiry-time": "2021-11-13T00:00:00Z",
    "source-storage-class": "GLACIER"
  }
}
```

## 이벤트 메시지 세부 정보 필드
<a name="ev-events-detail"></a>

세부 정보 필드에는 이벤트에 대한 정보가 포함된 JSON 객체가 있습니다. 세부 정보 필드에 다음 필드가 있을 수 있습니다.
+ `version` – 현재 모든 이벤트에 대해 0(영)입니다.
+ `bucket` – 이벤트와 관련된 Amazon S3 버킷에 대한 정보입니다.
+ `object` – 이벤트와 관련된 Amazon S3 객체에 대한 정보입니다.
+ `request-id` – S3 응답의 요청 ID입니다.
+ `requester` – 요청자의 AWS 계정 ID 또는 AWS 서비스 보안 주체입니다.
+ `source-ip-address` – S3 요청의 소스 IP 주소입니다. S3 요청에 의해 트리거된 이벤트의 경우에만 있습니다.
+ `reason` – **객체 생성됨** 이벤트의 경우 객체를 생성하는 데 사용된 S3 API입니다(예: [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html), [https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html), [https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) 또는 [https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)). **객체 삭제됨** 이벤트의 경우 객체가 S3 API 직접 호출에 의해 삭제되면 **DeleteObject**로 설정되고, S3 수명 주기 만료 규칙에 의해 객체가 삭제되면 **수명 주기 만료**로 설정됩니다. 자세한 내용은 [객체 만료](lifecycle-expire-general-considerations.md) 섹션을 참조하세요.
+ `deletion-type` – **객체 삭제됨** 이벤트의 경우 버전이 지정되지 않은 객체가 삭제되거나 버전이 관리되는 객체가 영구적으로 삭제되면 **영구 삭제됨**으로 설정됩니다. 버전이 지정된 객체에 대해 삭제 마커가 생성되면 **삭제 마커 생성됨(Delete Marker Created)**으로 설정됩니다. 자세한 내용은 [버전 관리가 사용 설정된 버킷에서 객체 버전 삭제](DeletingObjectVersions.md) 섹션을 참조하세요.
**참고**  
일부 객체 속성(예: `etag` 및 `size`)은 삭제 마커가 생성된 경우에만 표시됩니다.
+ `restore-expiry-time` – **객체 복원 완료됨** 이벤트의 경우 객체의 임시 복사본이 S3에서 삭제되는 시간입니다. 자세한 내용은 [아카이브된 객체 작업](archived-objects.md) 섹션을 참조하세요.
+ `source-storage-class` – **객체 복원 시작됨** 및 **객체 복원 완료됨** 이벤트의 경우 복원 중인 객체의 스토리지 클래스입니다. 자세한 내용은 [아카이브된 객체 작업](archived-objects.md) 섹션을 참조하세요.
+ `destination-storage-class` – **객체 스토리지 클래스 변경됨** 이벤트의 경우 객체의 새 스토리지 클래스입니다. 자세한 내용은 [Amazon S3 수명 주기를 사용하여 객체 전환](lifecycle-transition-general-considerations.md) 섹션을 참조하세요.
+ `destination-access-tier` – **객체 액세스 계층 변경됨** 이벤트의 경우 객체의 새 액세스 계층입니다. 자세한 내용은 [Amazon S3 Intelligent-Tiering을 사용한 스토리지 비용 관리](intelligent-tiering.md) 섹션을 참조하세요.