

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

# Amazon SES 이벤트 게시를 사용하여 이메일 전송 모니터링
<a name="monitor-using-event-publishing"></a>

이메일 전송을 세부적으로 추적하기 위해 정의한 특성에 따라 Amazon CloudWatch, Amazon Data Firehose, Amazon Pinpoint, Amazon Simple Notification Service 또는 Amazon EventBridge에 *이메일 전송 이벤트*를 게시할 수 있도록 Amazon SES를 설정할 수 있습니다.

발신, 전송, 열기, 클릭, 반송, 수신 거부, 거부, 렌더링 실패 및 전송 지연을 포함하는 다양한 이메일 전송 이벤트 유형을 추적할 수 있습니다. 이 정보는 운영 및 분석에 유용할 수 있습니다. 예를 들어 이메일 전송 데이터를 CloudWatch에 게시하고 이메일 캠페인의 성과를 추적하는 대시보드를 만들거나 Amazon SNS를 사용해 특정 이벤트가 발생할 때 알림을 전송할 수 있습니다.

## 이벤트 게시가 구성 세트 및 메시지 태그와 작동하는 방법
<a name="event-publishing-how-works"></a>

이벤트 게시를 사용하려면 우선 하나 이상의 *구성 세트*를 설정해야 합니다. 구성 세트는 어떤 이벤트를 어디에 게시할지 지정합니다. 그런 다음 이메일을 보낼 때마다 구성 세트의 이름과 하나 이상의 *메시지 태그*를 이름/값 페어 형식으로 제공하여 이메일을 분류합니다. 예를 들어 책을 광고하는 경우, 메시지 태그에 *genre*라는 이름을 붙이고 *sci-fi* 또는 *western* 값을 할당할 수 있습니다.

사용 중인 이메일 전송 인터페이스에 따라 메시지 태그를 [https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html) API 작업 [https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html#SES-SendEmail-request-EmailTags](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html#SES-SendEmail-request-EmailTags) 필드에 파라미터로 제공하거나 SES별 이메일 헤더 [https://docs.aws.amazon.com/ses/latest/dg/event-publishing-send-email.html#event-publishing-using-ses-headers](https://docs.aws.amazon.com/ses/latest/dg/event-publishing-send-email.html#event-publishing-using-ses-headers)에 메시지 태그를 추가합니다. 구성 세트에 대한 자세한 내용은 [Amazon SES에서 구성 세트 사용](using-configuration-sets.md) 단원을 참조하세요.

SES는 지정하는 메시지 태그 외에도 전송 메시지에 *자동 태그*도 추가합니다. 자동 태그를 사용하기 위해 추가로 실행해야 할 단계도 없습니다.

다음 테이블은 SES를 사용하여 전송하는 메시지에 자동으로 적용되는 자동 태그를 나열한 것입니다.


**SES 자동 태그**  

| 자동 태그 이름 | 설명 | 
| --- | --- | 
| ses:caller-identity | 이메일을 전송한 SES 사용자의 IAM ID입니다. | 
| ses:configuration-set | 이메일에 연결된 구성 세트의 이름 | 
| ses:from-domain | "From" 주소의 도메인 | 
| ses:outgoing-ip | SES가 이메일 전송에 사용한 IP 주소입니다. | 
| ses:source-ip | 호출자가 이메일 전송에 사용한 IP 주소. | 
| ses:source-tls-version | 발신자가 이메일을 보내는 데 사용한 TLS 프로토콜 버전입니다. | 
| ses:outgoing-tls-version | SES가 이메일 전송에 사용한 TLS 프로토콜 버전입니다. | 

## 이메일 캠페인에 대한 세분화된 피드백
<a name="event-publishing-fine-grained-feedback"></a>

`ses:feedback-id-<a or b>` 태그는 하이브리드 또는 반자동 태그로 생각할 수 있는 선택적 메시지 태그입니다. 이전 섹션에서 다룬 자동 태그와 비슷하지만, 차이점은 수동으로 추가하고 `ses:` 접두사 키를 사용해야 한다는 것입니다. `ses:feedback-id-a` 및 `ses:feedback-id-b`로 정의된 이러한 태그 중 최대 2개를 사용할 수 있습니다.

이러한 태그를 지정하면 SES는 피드백 루프(FBL)의 일부로 수신 거부, 스팸 비율 등의 전송 통계를 제공하는 데 사용되는 표준 `Feedback-ID` 헤더에 태그를 자동으로 추가합니다. [피드백 루프](faqs-enforcement.md#cm-feedback-loop)의 내용을 참조하세요. `Feedback-ID` 헤더는 SES에서 수신 거부 정보 수집에 사용하는 *SESInternalID* 식별자와 SES를 다음과 같은 전송 플랫폼으로 식별하는 *AmazonSES* 정적 태그로 구성됩니다.

`FeedBackId:feedback-id-a:feedback-id-b:((SESInternalID):(AmazonSES))`

이러한 선택적 피드백 ID 태그는 이메일 캠페인의 일부로 보내는 메시지와 같이 세분화된 피드백을 생성하는 방법으로 제공됩니다. 다음 예제와 같이 [https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html) 작업 요청의 [https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html#SES-SendEmail-request-EmailTags](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html#SES-SendEmail-request-EmailTags) 필드에 메시지 태그로 지정하여 `ses:feedback-id-<a or b>`를 사용할 수 있습니다.

```
{
  "FromEmailAddress": "noreply@example.com",
  "Destination": {
    "ToAddresses": [
      "customer@example.net"
    ]
  },
  "Content": {
    "Simple": {
      "Subject": {
        "Data": "Hello and welcome"
      },
      "Body": {
        "Text": {
          "Data": "Lorem ipsum dolor sit amet."
        },
        "Html": {
          "Data": "Lorem ipsum dolor sit amet."
        }
      }
    }
  },
  "EmailTags": [
    {
      "Name": "ses:feedback-id-a",
      "Value": "new-members-campaign"
    },
    {
      "Name": "ses:feedback-id-b",
      "Value": "football-campaign"
    }
  ],
  "ConfigurationSetName": "football-club"
}
```

원시 형식으로 전송하는 경우 SES별 헤더 [`X-SES-MESSAGE-TAGS`](event-publishing-send-email.md#event-publishing-using-ses-headers)에 메시지 태그로 `ses:feedback-id-<a or b>`를 추가하면 됩니다.

`ses:feedback-id-<a or b>` 메시지 태그는 다른 메시지 태그와 마찬가지로 CloudWatch 값 소스로 지정하여 Amazon CloudWatch에서 추적할 수도 있습니다. [CloudWatch 이벤트 대상 추가](event-publishing-add-event-destination-cloudwatch.md#event-publishing-add-event-destination-cloudwatch-add)의 내용을 참조하세요*(추가 요금이 적용되며, [CloudWatch의 지표당 요금](event-publishing-add-event-destination-cloudwatch.md#cw-add-pricing) 참조).*

## 이벤트 게시 사용 방법
<a name="event-publishing-how-to-use"></a>

다음 섹션에는 SES 이벤트 게시를 설정하고 사용하는 데 필요한 정보가 포함되어 있습니다.
+ [이벤트 게시 설정](monitor-sending-using-event-publishing-setup.md)
+ [이벤트 데이터 작업](working-with-event-data.md)

## 이벤트 게시 용어
<a name="event-publishing-terminology"></a>

다음 목록은 SES 이벤트 게시에 관련된 용어를 정의한 것입니다.

**이메일 전송 이벤트**  
SES에 제출한 이메일의 결과와 관련된 정보입니다. 전송 이벤트에는 다음이 포함됩니다.  
+ **전송(Send)** - 전송 요청이 성공했으며 Amazon SES는 메시지를 수신자의 메일 서버로 전송합니다. (계정 수준 또는 전역 금지를 사용하는 경우 SES가 여전히 전송으로 계산하지만 배달은 금지합니다.)
+ **렌더링 오류** – 템플릿 렌더링 문제로 인해 이메일이 전송되지 않았습니다. 이 이벤트 유형은 템플릿 데이터가 누락되었을 때 또는 템플릿 파라미터와 데이터 사이에 불일치가 있을 때 발생할 수 있습니다. (이 이벤트 유형은 [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) 또는 [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) API 작업을 사용하는 이메일을 전송할 때만 발생합니다.)
+ **거부(Reject)** - Amazon SES가 이메일을 수락했으나 이메일에 바이러스가 포함된 것으로 판단되어 수신자의 메일 서버로 전송하려고 시도하지 않았습니다.
+ **배달(Delivery)** - Amazon SES에서 이메일을 수신자의 메일 서버로 성공적으로 전송했습니다.
+ **바운스** – 수신자의 메일 서버가 이메일을 영구적으로 거부하는 *하드 바운스*입니다. (*소프트 바운스*는 SES가 더 이상 이메일 전송을 재시도하지 않는 경우에만 포함됩니다. 일반적으로 이러한 소프트 바운스는 전송 실패를 나타내지만, 메일이 수신자의 받은 편지함에 도착하더라도 소프트 바운스가 반환되는 경우도 있습니다. 이러한 상황은 일반적으로 수신자가 부재 중 자동 회신을 보낼 때 발생합니다. [AWS re:Post 문서](https://repost.aws/knowledge-center/ses-understand-soft-bounces)에서 소프트 바운스에 대해 자세히 알아보세요.)
+ **수신 거부(Complaint)** - 이메일이 수신자의 메일 서버로 성공적으로 전송되었지만 수신자가 이를 스팸으로 표시했습니다.
+ **배달 지연** – 일시적인 문제가 발생하여 수신자의 메일 서버에 이메일을 전송할 수 없습니다. 예를 들어 수신자의 받은 편지함이 가득 찼거나 이메일 수신 서버에 일시적인 문제가 발생했을 때 전송 지연이 발생할 수 있습니다.
+ **구독(Subscription)** - 이메일이 성공적으로 배달되었지만 수신자가 이메일 헤더에서 `List-Unsubscribe`를 클릭하거나, 바닥글에서 `Unsubscribe` 링크를 선택하여 구독 기본 설정을 업데이트했습니다.
+ **열기(Open)** – 수신자가 메시지를 수신하여 자신의 이메일 클라이언트에서 열었습니다.
+ **클릭(Click)** – 수신자가 이메일의 링크를 1개 이상 클릭했습니다.

**구성 세트**  
SES에서 이메일 전송 이벤트를 게시할 대상과 게시하려는 이메일 전송 이벤트 유형을 정의하는 규칙 세트입니다. 이벤트 게시와 함께 사용하려는 이메일을 전송할 때 이메일에 연결할 구성 세트를 지정합니다.

**이벤트 대상**  
SES 이메일 전송 이벤트를 게시하는 AWS 서비스입니다. 설정하는 각 이벤트 대상은 단 하나의 구성 세트에만 속합니다.

**메시지 태그**  
이벤트 게시를 목적으로 이메일을 분류하는 데 사용하는 이름/값 페어입니다. 예를 들면 *campaign/book*, *campaign/clothing*의 형식입니다. 이메일을 전송할 때 API 직접 호출에 대한 파라미터 또는 SES별 이메일 헤더로 메시지 태그를 지정합니다.

**자동 태그**  
이벤트 게시 보고서에 자동으로 포함되는 메시지 태그입니다. 구성 세트 이름, 'From' 주소의 도메인, 호출자의 발신 IP 주소, SES 발신 IP 주소, 호출자의 IAM ID를 표시하는 자동 태그가 있습니다.

# Amazon SES를 사용하여 이벤트 게시 설정
<a name="monitor-sending-using-event-publishing-setup"></a>

이 섹션에서는 다음 AWS 서비스에 이메일 전송 이벤트를 게시하도록 Amazon SES를 구성하기 위해 수행해야 하는 작업에 대해 설명합니다.
+ Amazon CloudWatch
+ Amazon Data Firehose
+ Amazon Pinpoint
+ Amazon Simple Notification Service(Amazon SNS)

이벤트 게시 설정에 필요한 다음 단계는 아래 주제에서 다룹니다.

1. 먼저 Amazon SES 콘솔 또는 API를 사용하여 *구성 세트*를 생성해야 합니다.

1. 구성 세트에 하나 이상의 *이벤트 대상*(CloudWatch, Firehose, Pinpoint 또는 SNS)을 추가하고 이벤트 대상에 고유한 파라미터를 구성합니다.

1. 이메일을 전송할 때 이벤트 대상을 포함하여 사용할 구성 세트를 지정합니다.

**Topics**
+ [1단계: 구성 세트 만들기](event-publishing-create-configuration-set.md)
+ [2단계: 이벤트 대상 추가](event-publishing-add-event-destination.md)
+ [3단계: 이메일을 전송할 때 구성 세트 지정](event-publishing-send-email.md)

# 1단계: 구성 세트 만들기
<a name="event-publishing-create-configuration-set"></a>

이벤트 게시를 설정하려면 먼저 구성 세트가 있어야 합니다. 아직 구성 세트가 없거나 새 구성 세트를 만들려는 경우[SES에서 구성 세트 생성](creating-configuration-sets.md) 단원을 참조하십시오.

또한 Amazon SES CLI v2를 사용하거나 Amazon SES API V2에서 [CreateConfigurationSet](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_CreateConfigurationSet.html) 작업을 수행하여 구성 세트를 생성할 수 있습니다. [구성 세트를 만듭니다(AWS CLI).](creating-configuration-sets.md#config-sets-create-cli) 단원을 참조하십시오.

# 2단계: 이벤트 대상 추가
<a name="event-publishing-add-event-destination"></a>

이벤트 대상은 Amazon SES 이벤트를 게시하는 위치입니다. 설정하는 각 이벤트 대상은 단 하나의 구성 세트에만 속합니다. Amazon SES로 이벤트 대상을 설정할 때 AWS 서비스 대상을 선택하고 해당 대상과 연결된 파라미터를 지정합니다.

이벤트 대상을 설정할 때 다음 AWS 서비스 중 하나로 이벤트를 보내도록 선택할 수 있습니다.
+ Amazon CloudWatch
+ Amazon Data Firehose
+ Amazon EventBridge
+ Amazon Pinpoint
+ Amazon Simple Notification Service(Amazon SNS)

여기서 선택하는 이벤트 대상은 이벤트에 대해 알고자 하는 세부 정보 수준과 이벤트 정보를 수신하는 방법에 따라 달라집니다. 각 이벤트 유형의 누계 정보만 필요한 경우에는(예: 총계가 너무 높을 경우 경보를 설정할 수 있도록) CloudWatch를 사용합니다.

Amazon OpenSearch Service 또는 Amazon Redshift 등의 다른 서비스에 출력할 수 있는 상세한 이벤트 레코드로 분석하려는 경우에는 Firehose를 선택합니다.

특정 이벤트 발생 시 알림을 수신하려면 Amazon SNS를 선택합니다.

**Topics**
+ [이벤트 게시에 필요한 CloudWatch 이벤트 대상 설정](event-publishing-add-event-destination-cloudwatch.md)
+ [Amazon SES 이벤트 게시를 위한 Data Firehose 이벤트 대상 설정](event-publishing-add-event-destination-firehose.md)
+ [이벤트 게시에 필요한 Amazon EventBridge 대상 설정](event-publishing-add-event-destination-eventbridge.md)
+ [이벤트 게시에 필요한 Amazon Pinpoint 이벤트 대상 설정](event-publishing-add-event-destination-pinpoint.md)
+ [이벤트 게시에 필요한 Amazon SNS 이벤트 대상 설정](event-publishing-add-event-destination-sns.md)

# 이벤트 게시에 필요한 CloudWatch 이벤트 대상 설정
<a name="event-publishing-add-event-destination-cloudwatch"></a>

[Amazon CloudWatch 지표](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html)를 통해 이벤트 대상을 사용하여 Amazon SES 이메일 전송 이벤트를 CloudWatch로 게시할 수 있습니다. CloudWatch 이벤트 대상은 구성 세트에서만 설정할 수 있으므로, 먼저 [구성 세트를 만든](event-publishing-create-configuration-set.md) 다음 이벤트 대상을 구성 세트에 추가해야 합니다.

구성 세트에 CloudWatch 이벤트 대상을 추가할 경우에는 이메일 전송 시 사용하는 메시지 태그와 일치하는 CloudWatch *차원*을 하나 이상 선택해야 합니다. 메시지 태그와 마찬가지로 CloudWatch 차원은 지표를 고유하게 식별하는 데 도움을 주는 이름/값 페어입니다.

예컨대 `campaign`이라는 메시지 태그와 크기를 이메일 캠페인 식별에 사용할 수 있습니다. 이메일 전송 이벤트를 CloudWatch에 게시할 때 메시지 태그와 차원을 선택하는 것이 중요합니다. 이 선택이 CloudWatch 결제 금액에 영향을 미치고 CloudWatch 내에서 이메일 전송 이벤트 데이터를 필터링하는 방식을 결정하기 때문입니다.

이 섹션에서는 차원을 선택하는 데 도움이 되는 정보를 제공한 다음, CloudWatch 이벤트 대상을 구성 집합에 추가하는 방법을 보여줍니다.

**Topics**
+ [CloudWatch 이벤트 대상 추가](#event-publishing-add-event-destination-cloudwatch-add)
+ [CloudWatch 차원 선택](#event-publishing-add-event-destination-cloudwatch-dimensions)

## CloudWatch 이벤트 대상 추가
<a name="event-publishing-add-event-destination-cloudwatch-add"></a>

이 섹션의 절차에서는 구성 세트에 CloudWatch 이벤트 대상 세부 정보를 추가하는 방법을 보여주며 [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add) 섹션의 1\$16단계를 완료했다고 가정합니다.

뿐만 아니라 Amazon SES API V2에서 [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) 작업을 사용하여 이벤트 대상을 만들고 수정할 수 있습니다.

**콘솔을 사용하여 구성 세트에 CloudWatch 이벤트 대상을 추가하려면**

1. 다음은 [7단계에서 ](event-destinations-manage.md#specify-event-dest-step)이벤트 대상 유형으로 CloudWatch를 선택하기 위한 자세한 지침입니다. [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add)의 이전 단계를 모두 완료했다고 가정합니다. CloudWatch **대상 유형**을 선택하고 대상 **이름**을 입력한 후 **이벤트 게시**를 활성화하면 **Amazon CloudWatch 차원** 패널이 표시됩니다. 해당 필드는 다음 단계에서 처리됩니다. *(추가 요금이 적용되며, [CloudWatch의 지표당 요금](#cw-add-pricing) 참조)* 

1. **Value Source(값 소스)**에 Amazon SES가 CloudWatch로 전달되는 데이터를 가져오는 방법을 지정합니다. 다음과 같은 값 원본을 사용할 수 있습니다.
   + **Message Tag(메시지 태그)** – Amazon SES가 `X-SES-MESSAGE-TAGS` 헤더 또는 `EmailTags` API 파라미터를 사용하여 지정한 태그에서 차원 이름과 값을 검색합니다. 메시지 태그 사용에 대한 자세한 내용은 [3단계: 이메일을 전송할 때 구성 세트 지정](event-publishing-send-email.md) 섹션을 참조하세요.
**참고**  
메시지 태그에는 숫자 0-9, 문자 A-Z(대문자 및 소문자 모두 가능), 하이픈(-), 밑줄(\$1)이 포함될 수 있습니다.

     **Message Tag(메시지 태그)** 값 소스를 사용하여 Amazon SES 자동 태그에 따라 차원을 만들 수도 있습니다. 자동 태그를 사용하려면 자동 태그의 전체 이름을 **Dimension Name**(차원 이름)으로 입력합니다. 예를 들어, 구성 집합 자동 태그를 기반으로 차원을 생성하려면 **차원 이름**에 `ses:configuration-set`, **기본값**에 구성 세트의 이름을 지정합니다. 자동 태그의 전체 목록은 [이벤트 게시가 구성 세트 및 메시지 태그와 작동하는 방법](monitor-using-event-publishing.md#event-publishing-how-works) 섹션을 참조하세요.
   + **Email Header(이메일 헤더)** – Amazon SES가 이메일 헤더에서 차원 이름과 값을 검색합니다.
**참고**  
다음 **Dimension Name(차원 이름)**을 이메일 제목으로 사용할 수 없습니다. `Received`, `To`, `From`, `DKIM-Signature`, `CC`, `message-id` 또는 `Return-Path`.
   + **Link Tag(링크 태그)** – Amazon SES가 링크에 지정한 태그에서 차원 이름과 값을 검색합니다. 링크에 태그를 추가하는 방법에 대한 자세한 내용은 [링크에 고유 식별자로 태그를 지정할 수 있습니까?](faqs-metrics.md#sending-metric-faqs-clicks-q5) 섹션을 참조하세요.

1. **Dimension Name(차원 이름)**에 CloudWatch로 전달하려는 차원 이름을 입력합니다.
**참고**  
차원 이름에는 ASCII 문자(a-z, A-Z), 숫자(0-9), 밑줄(\$1) 및 대시(-)만 포함할 수 있습니다. 공백, 억양 표시가 되어 있는 문자, 비라틴 문자 및 기타 특수 문자는 허용되지 않습니다.

1. **Default Value(기본값)**에 차원 값을 입력합니다.
**참고**  
차원 값에는 ASCII 문자(a-z, A-Z), 숫자(0-9), 밑줄(\$1), 대시(-), @ 기호 및 마침표(.)만 포함할 수 있습니다. 공백, 억양 표시가 되어 있는 문자, 비라틴 문자 및 기타 특수 문자는 허용되지 않습니다.

1. 차원을 더 추가하려면 **차원 추가**를 선택합니다. 그렇지 않은 경우 **다음**을 선택합니다.

1. 검토 화면에서 이벤트 대상 정의 방식에 만족하면 **Add destination(대상 추가)**를 선택합니다.

## CloudWatch 차원 선택
<a name="event-publishing-add-event-destination-cloudwatch-dimensions"></a>

CloudWatch 차원으로 사용할 이름 및 값을 선택할 때는 다음 요소를 고려해야 합니다.
+ **지표당 가격** – CloudWatch에서는 기본 Amazon SES 지표를 무료로 볼 수 있습니다. 그러나 이벤트 게시를 사용하여 지표를 수집할 경우 [CloudWatch 세부 모니터링](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-metrics-basic-detailed.html) 비용이 발생합니다. 이벤트 유형, 차원 이름, 차원 값으로 구성되는 고유한 조합마다 CloudWatch 내에 서로 다른 지표를 만듭니다. CloudWatch, 세부 모니터링을 사용하는 경우 각 지표에 대해 요금이 부과됩니다. 이런 이유로, 다수의 서로 다른 값이 필요할 수 있는 크기를 선택하기 꺼려질 수 있습니다. 예를 들어 "발신" 도메인별로 이메일 전송 이벤트를 추적하는 데 큰 관심을 두지 않는 한, Amazon SES 자동 태그 `ses:from-domain`의 차원을 정의하지 않는 편이 낫습니다. 수많은 값이 필요할 수 있기 때문입니다. 자세한 내용은 [CloudWatch 요금](https://aws.amazon.com/cloudwatch/pricing)을 참조하세요.
+ **Metric filtering(지표 필터링)** – 지표에 여러 개의 차원이 있으면 CloudWatch에서 각 차원에 따라 개별적으로 지표에 액세스할 수 없습니다. 따라서 하나의 CloudWatch 이벤트 대상에 두 개 이상의 대상을 추가하기 전에는 심사숙고해야 합니다. 예를 들어 `campaign` 지표와 `campaign` \$1 `genre` 조합의 지표가 필요한 경우, 두 개의 이벤트 대상을 추가해야 합니다. 하나는 `campaign`만 차원으로 하고, 또 하나는 `campaign`과 `genre`를 차원으로 해야 합니다.
+ **Dimension value source(차원 값 소스)** – Amazon SES지정 헤더 또는 API에 대한 파라미터를 사용하여 차원 값을 지정하는 대신 사용자 고유의 MIME 메시지 헤더에서 Amazon SES가 차원 값을 가져오도록 선택할 수도 있습니다. 사용자 지정 헤더를 이미 사용 중이고, 헤더 값을 기반으로 지표를 수집하기 위해 이메일이나 이메일 전송 API에 대한 호출을 변경하고 싶지 않은 경우에 이 옵션을 사용할 수 있습니다. Amazon SES 이벤트 게시에 사용자 고유의 MIME 메시지 헤더를 사용하는 경우 Amazon SES 이벤트 게시에 사용하는 헤더 이름과 값은 문자 A-Z, 숫자 0-9, 밑줄(\$1), @ 기호, 하이픈(-) 및 마침표(.)만 포함할 수 있습니다. 다른 문자가 들어 있는 이름이나 값을 지정하면 이메일 전송 호출은 성공하겠지만 이벤트 지표가 Amazon CloudWatch로 전송되지 않습니다.

CloudWatch 개념에 대한 자세한 내용은 *Amazon CloudWatch 사용 설명서*의 [Amazon CloudWatch 개념](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html)을 참조하세요.

# Amazon SES 이벤트 게시를 위한 Data Firehose 이벤트 대상 설정
<a name="event-publishing-add-event-destination-firehose"></a>

Amazon Data Firehose 이벤트 대상은 특정 Amazon SES 이메일 전송 이벤트를 Firehose로 게시하는 엔터티를 나타냅니다. Firehose 이벤트 대상은 구성 세트에서만 설정할 수 있으므로, 먼저 [구성 세트를 만들어야](event-publishing-create-configuration-set.md) 합니다. 그런 다음 구성 세트에 이벤트 대상을 추가합니다.

이 섹션의 절차에서는 구성 세트에 Firehose 이벤트 대상 세부 정보를 추가하는 방법을 보여주며 [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add) 섹션의 1\$16단계를 완료했다고 가정합니다.

뿐만 아니라 Amazon SES API V2 대상에서 [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) 작업을 사용하여 이벤트 대상을 만들고 업데이트할 수 있습니다.

**콘솔을 사용하여 구성 세트에 Firehose 이벤트 대상 세부 정보를 추가하려면**

1. 다음은 [7단계](event-destinations-manage.md#specify-event-dest-step)에서 이벤트 대상 유형으로 Firehose를 선택하기 위한 자세한 지침입니다. [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add)의 이전 단계를 모두 완료했다고 가정합니다. Firehose **대상 유형**을 선택하고 대상 **이름**을 입력한 후 **이벤트 게시**를 활성화하면 **Amazon Data Firehose 전송 스트림** 패널이 표시됩니다. 해당 필드는 다음 단계에서 처리됩니다.

1. **전송 스트림**에서 기존 Firehose 전송 스트림을 선택하거나 **새 스트림 만들기**를 선택하여 Firehose 콘솔을 통해 새 스트림을 만듭니다.

   Firehose 콘솔을 사용하여 스트림을 만드는 방법에 대한 내용은 *Amazon Data Firehose 개발자 안내서*에서 [Amazon Kinesis Firehose 전송 스트림 만들기](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html)를 참조하세요.

1. **Identity and Access Management(IAM) 역할**에 대해 Amazon SES가 사용자를 대신하여 Firehose에 게시할 수 있는 권한을 가진 IAM 역할을 선택합니다. 기존 역할을 선택하거나 Amazon SES가 역할을 대신 만들도록 설정하거나 직접 역할을 만들 수 있습니다.

   기존 역할을 선택하거나 직접 역할을 만드는 경우 역할의 정책을 수동으로 변경하여 Firehose 전송 스트림에 대한 액세스 권한을 역할에 부여하고 Amazon SES에 그 역할을 담당할 권한을 부여해야 합니다. 예시 정책은 [Firehose 전송 스트림에 게시할 수 있는 권한을 Amazon SES에 부여하기](#event-publishing-add-event-destination-firehose-role) 섹션을 참조하세요.

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

1. 검토 화면에서 이벤트 대상 정의 방식에 만족하면 **Add destination(대상 추가)**를 선택합니다.

`UpdateConfigurationSetEventDestination` API를 사용하여 Firehose 이벤트 대상을 추가하는 방법에 대한 내용은 [Amazon Simple Email Service API 참조](https://docs.aws.amazon.com/ses/latest/APIReference/API_UpdateConfigurationSetEventDestination.html)를 참조하세요.

## Firehose 전송 스트림에 게시할 수 있는 권한을 Amazon SES에 부여하기
<a name="event-publishing-add-event-destination-firehose-role"></a>

Amazon SES가 Firehose 전송 스트림에 레코드를 게시하도록 하려면 AWS Identity and Access Management (IAM) [역할](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)을 이용하여 역할의 권한 정책과 신뢰 정책을 연결하거나 변경해야 합니다. 권한 정책은 역할이 Firehose 전송 스트림에 레코드를 게시하도록 허용하고 신뢰 정책은 Amazon SES가 그 역할을 담당하도록 허용합니다.

이 섹션에서는 두 정책의 예를 제공합니다. IAM 역할에 정책을 연결하는 방법에 대한 자세한 내용은 *IAM 사용 설명서*의 [역할 변경](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_modify.html)을 참조하세요.

### 권한 정책
<a name="event-publishing-add-event-destination-firehose-role-permission"></a>

다음 권한 정책은 역할이 Firehose 전송 스트림에 데이터 레코드를 게시하도록 허용합니다.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Action": [
                "firehose:PutRecordBatch"
            ],
            "Resource": [
                "arn:aws:firehose:us-east-1:111122223333:deliverystream/delivery-stream-name"
            ]
        }
    ]
}
```

------

이전 정책 예제에서 다음과 같이 변경합니다.
+ *delivery-region*을 Firehose 전송 스트림을 생성한 AWS 리전으로 바꿉니다.
+ *111122223333*을 AWS 계정 ID로 바꿉니다.
+ *delivery-stream-name*을 Firehose 전송 스트림의 이름으로 바꿉니다.

### 신뢰 정책
<a name="event-publishing-add-event-destination-firehose-role-trust"></a>

다음 신뢰 정책은 Amazon SES가 역할을 담당하도록 허용합니다.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "ses.amazonaws.com"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": {
          "AWS:SourceAccount": "111122223333",
          "AWS:SourceArn": "arn:aws:ses:delivery-region:111122223333:configuration-set/configuration-set-name"
        }
      }
    }
  ]
}
```

------

이전 정책 예제에서 다음과 같이 변경합니다.
+ *delivery-region*을 Firehose 전송 스트림을 생성한 AWS 리전으로 바꿉니다.
+ *111122223333*을 AWS 계정 ID로 바꿉니다.
+ *configuration-set-name*을 Firehose 전송 스트림과 연결된 구성 세트 이름으로 바꿉니다.

# 이벤트 게시에 필요한 Amazon EventBridge 대상 설정
<a name="event-publishing-add-event-destination-eventbridge"></a>

Amazon EventBridge 이벤트 대상은 구성 세트에서 지정한 이메일 전송 이벤트에 대해 알려줍니다. SES는 이벤트 대상을 만들 때 정의한 이메일 전송 이벤트를 생성하여 EventBridge 기본 이벤트 버스로 전송합니다. [이벤트 버스](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus.html)는 이벤트를 수신하여 여러 대상으로 전달할 수 있는 라우터입니다. [Amazon EventBridge를 사용하여 SES 이벤트 모니터링](monitoring-eventbridge.md)에서 이메일 전송 이벤트를 Amazon EventBridge와 통합하는 방법에 대해 자세히 알아볼 수 있습니다. EventBridge 이벤트 대상은 구성 세트에서만 설정할 수 있으므로, 구성 세트에 이벤트 대상을 추가하기 전에 [구성 세트를 만들어야](event-publishing-create-configuration-set.md) 합니다.

이 섹션의 절차에서는 구성 세트에 EventBridge 이벤트 대상 세부 정보를 추가하는 방법을 보여주며 [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add) 섹션의 1\$16단계를 완료했다고 가정합니다.

뿐만 아니라 Amazon SES API V2에서 [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) 작업을 사용하여 이벤트 대상을 만들고 수정할 수 있습니다.

**콘솔을 사용하여 구성 세트에 EventBridge 이벤트 대상 세부 정보를 추가하려면**

1. 다음은 [7단계](event-destinations-manage.md#specify-event-dest-step)에서 이벤트 대상 유형으로 EventBridge를 선택하기 위한 자세한 지침입니다. [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add)의 이전 단계를 모두 완료했다고 가정합니다. *Amazon EventBridge* **대상 유형**을 선택하고, 대상 **이름**을 입력하고, **이벤트 게시**를 활성화하면 **Amazon EventBridge 이벤트 버스** 정보 패널이 표시됩니다.

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

1. 검토 화면에서 이벤트 대상 정의 방식에 만족하면 **Add destination(대상 추가)**를 선택합니다. 그러면 이벤트 대상의 요약 페이지가 열리고 거기서 성공 배너를 통해 이벤트 대상이 성공적으로 만들어지거나 수정되었음을 확인할 수 있습니다.

# 이벤트 게시에 필요한 Amazon Pinpoint 이벤트 대상 설정
<a name="event-publishing-add-event-destination-pinpoint"></a>

Amazon Pinpoint 이벤트 대상은 구성 세트에서 지정한 이메일 전송 이벤트에 대해 알려줍니다. Amazon Pinpoint 이벤트 대상은 구성 세트에서만 설정할 수 있으므로, 구성 세트에 이벤트 대상을 추가하기 전에 [구성 세트를 만들어야](event-publishing-create-configuration-set.md) 합니다.

이 섹션의 절차에서는 구성 세트에 Amazon Pinpoint 이벤트 대상 세부 정보를 추가하는 방법을 보여주며 [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add) 섹션의 1\$16단계를 완료했다고 가정합니다.

뿐만 아니라 Amazon SES API V2에서 [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) 작업을 사용하여 이벤트 대상을 만들고 수정할 수 있습니다.

Amazon Pinpoint 프로젝트에서 구성한 채널 유형에 대한 추가 요금이 있습니다. 자세한 내용은 [Amazon Pinpoint 요금](https://aws.amazon.com/pinpoint/pricing/) 섹션을 참조하세요.

**콘솔을 사용하여 구성 집합에 Amazon Pinpoint 이벤트 대상을 추가하려면**

1. 다음은 [7단계에서 ](event-destinations-manage.md#specify-event-dest-step)이벤트 대상 유형으로 Amazon Pinpoint를 선택하기 위한 자세한 지침입니다. [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add)의 이전 단계를 모두 완료했다고 가정합니다.
**참고**  
Amazon Pinpoint는 **배달 지연** 또는 **구독** 이벤트 유형은 지원하지 않습니다.

   Amazon Pinpoint **대상 유형**을 선택하고 대상 **이름**을 입력한 후 **이벤트 게시**를 활성화하면 **Amazon Pinpoint 프로젝트 세부 정보** 패널이 표시됩니다. 해당 필드는 다음 단계에서 처리됩니다.

1. **프로젝트(Project)**에서는 기존 Amazon Pinpoint 프로젝트를 선택하거나 **Amazon Pinpoint에서 새 프로젝트 만들기(Create a new project in Amazon Pinpoin)**를 선택하여 새 프로젝트를 생성합니다.

   프로젝트 생성에 대한 자세한 내용은 *Amazon Pinpoint 사용 설명서*의 [프로젝트 만들기](https://docs.aws.amazon.com/pinpoint/latest/userguide/gettingstarted-create-project.html)를 참조하세요.

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

1. 검토 화면에서 이벤트 대상 정의 방식에 만족하면 **Add destination(대상 추가)**를 선택합니다. 그러면 이벤트 대상의 요약 페이지가 열리고 거기서 성공 배너를 통해 이벤트 대상이 성공적으로 만들어지거나 수정되었음을 확인할 수 있습니다.

# 이벤트 게시에 필요한 Amazon SNS 이벤트 대상 설정
<a name="event-publishing-add-event-destination-sns"></a>

Amazon SNS 이벤트 대상은 구성 세트에서 지정한 이메일 전송 이벤트에 대해 알려줍니다. Amazon SNS 이벤트 대상은 구성 세트에서만 설정할 수 있으므로, 구성 세트에 이벤트 대상을 추가하기 전에 [구성 세트를 만들어야](event-publishing-create-configuration-set.md) 합니다.

이 섹션의 절차에서는 구성 세트에 Amazon SNS 이벤트 대상 세부 정보를 추가하는 방법을 보여주며 [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add) 섹션의 1\$16단계를 완료했다고 가정합니다.

뿐만 아니라 Amazon SES API V2에서 [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) 작업을 사용하여 이벤트 대상을 만들고 수정할 수 있습니다.

**참고**  
확인된 모든 전송 보안 인증과 관련해 Amazon SNS에서 반송 메일, 수신 거부 및 전달에 대한 피드백 알림을 설정할 수도 있습니다. 자세한 내용은 [Amazon SES에 대한 Amazon SNS 알림 구성](configure-sns-notifications.md) 섹션을 참조하세요.

Amazon SNS 주제를 구독하는 엔드포인트로 메시지를 보내는 경우 추가 요금이 부과됩니다. 자세한 내용은 [Amazon SNS 요금](https://aws.amazon.com/sns/pricing/)을 참조하세요.

**콘솔을 사용하여 구성 집합에 Amazon SNS 이벤트 대상을 추가하려면**

1. 다음은 [7단계에서 ](event-destinations-manage.md#specify-event-dest-step)이벤트 대상 유형으로 Amazon SNS를 선택하기 위한 자세한 지침입니다. [이벤트 대상 만들기](event-destinations-manage.md#event-destination-add)의 이전 단계를 모두 완료했다고 가정합니다. Amazon SNS **대상 유형**을 선택하고 대상 **이름**을 입력한 후 **이벤트 게시**를 활성화하면 **Amazon Simple Notification Service(Amazon SNS) 주제** 패널이 표시됩니다. 해당 필드는 다음 단계에서 처리됩니다.

1. **SNS topic(SNS 주제)**에서 기존 Amazon SNS 주제를 선택하거나 **Create SNS topic(SNS 주제 만들기)**을 선택하여 새로운 주제를 생성합니다.

   자세한 내용은 *Amazon Simple Notification Service 개발자 가이드*의 [주제 만들기](https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)를 참조하세요.
**중요**  
Amazon SNS를 사용하여 주제를 만들 때 **유형**으로 **Standard(표준)**만을 선택해야 합니다. (SES는 FIFO 유형 주제를 지원하지 않습니다.)

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

1. 검토 화면에서 이벤트 대상 정의 방식에 만족하면 **Add destination(대상 추가)**를 선택합니다. 그러면 이벤트 대상의 요약 페이지가 열리고 거기서 성공 배너를 통해 이벤트 대상이 성공적으로 만들어지거나 수정되었음을 확인할 수 있습니다.

1. 이제 새 SNS 주제를 만들든 기존 주제를 선택하든 관계없이 SES에 대한 액세스 권한을 부여하여 주제에 알림을 게시해야 합니다. 이전 단계의 이벤트 대상 요약 페이지에 있는 **대상 유형** 열에서 **Amazon SNS**를 선택합니다. 그러면 Amazon Simple Notification Service 콘솔의 **주제(Topics)** 목록이 나타납니다. *Amazon SNS 콘솔에서 다음 단계를 수행합니다.*

   1. 이전 단계에서 만들거나 수정한 SNS 주제의 이름을 선택합니다.

   1. 주제의 세부 정보 화면에서 **편집(Edit)**을 선택합니다.

   1. SES에 주제에 대한 알림을 게시할 수 있는 권한을 부여하려면 SNS 콘솔의 **주제 편집** 화면에서 **액세스 정책**을 확장하고 **JSON 에디터**에 다음 권한 정책을 추가합니다.

------
#### [ JSON ]

****  

      ```
      {
          "Version":"2012-10-17",		 	 	 
          "Id": "notification-policy",
          "Statement": [
              {
                  "Effect": "Allow",
                  "Principal": {
                      "Service": "ses.amazonaws.com"
                  },
                  "Action": "sns:Publish",
                  "Resource": "arn:aws:sns:us-east-1:111122223333:topic_name",
                  "Condition": {
                      "StringEquals": {
                          "AWS:SourceAccount": "111122223333",
                          "AWS:SourceArn": "arn:aws:ses:topic_region:111122223333:configuration-set/configuration-set-name"
                      }
                  }
              }
          ]
      }
      ```

------

      이전 정책 예제에서 다음과 같이 변경합니다.
      + SNS 주제를 만드는 AWS 리전을 *topic\$1region*으로 교체합니다.
      + *111122223333*을 AWS 계정 ID로 바꿉니다.
      + *topic\$1name*을 SNS 주제의 이름으로 바꿉니다.
      + *configuration-set-name*을 SNS 이벤트 대상과 연결된 구성 세트 이름으로 바꿉니다.

   1. **변경 사항 저장**을 선택합니다.

# 3단계: 이메일을 전송할 때 구성 세트 지정
<a name="event-publishing-send-email"></a>

[구성 세트를 생성](event-publishing-create-configuration-set.md)하고 [이벤트 대상을 추가](event-publishing-add-event-destination.md)한 후 이벤트 게시의 마지막 단계는 이메일을 전송하는 것입니다.

이메일과 연결된 이벤트를 게시하려면 해당 이메일과 연결할 구성 세트 이름을 제공해야 합니다. 필요한 경우 메시지 태그를 제공하여 이메일을 분류할 수 있습니다.

이 정보를 이메일 전송 API에 대한 파라미터, Amazon SES 지정 이메일 헤더 또는 MIME 메시지 내 사용자 지정 헤더 중 하나로 Amazon SES에 제공합니다. 선택은 다음 표와 같이 사용 중인 이메일 전송 인터페이스에 따라 달라집니다.


****  

| 이메일 전송 인터페이스 | 이벤트 게시 방법 | 
| --- | --- | 
|  `SendEmail`  |  API 파라미터  | 
|  `SendTemplatedEmail`  |  API 파라미터  | 
|  `SendBulkTemplatedEmail`  |  API 파라미터  | 
|  `SendCustomVerificationEmail`  |  API 파라미터  | 
|  `SendRawEmail`  |  API 파라미터, Amazon SES 지정 이메일 헤더 또는 사용자 지정 MIME 헤더   헤더와 API 파라미터를 모두 사용하여 메시지 태그를 지정하더라도 Amazon SES는 API 파라미터가 제공한 메시지 태그만 사용합니다. Amazon SES는 API 파라미터와 헤더로 지정된 메시지 태그를 조인하지 않습니다.   | 
|  SMTP 인터페이스  |  Amazon SES 지정 이메일 헤더  | 

다음 단원에서는 헤더 및 API 파라미터를 사용하여 구성 세트와 메시지 태그를 지정하는 방법에 대해 설명합니다.
+ [Amazon SES API 파라미터 사용](#event-publishing-using-ses-parameters)
+ [Amazon SES 지정 이메일 헤더 사용](#event-publishing-using-ses-headers)
+ [사용자 지정 이메일 헤더 사용](#event-publishing-using-custom-headers)

**참고**  
선택적으로 메시지 태그를 이메일의 헤더에 포함시킬 수 있습니다. 메시지 태그에는 숫자 0-9, 문자 A-Z(대문자 및 소문자 모두 가능), 하이픈(-), 밑줄(\$1)이 포함될 수 있습니다.

## Amazon SES API 파라미터 사용
<a name="event-publishing-using-ses-parameters"></a>

[SendEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendEmail.html), [SendTemplatedEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html), [SendBulkTemplatedEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html), [SendCustomVerificationEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendCustomVerificationEmail.html) 또는 [SendRawEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendRawEmail.html)을 이벤트 게시와 함께 사용하려면 [ConfigurationSet](https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html) 및 [MessageTag](https://docs.aws.amazon.com/ses/latest/APIReference/API_MessageTag.html)라는 데이터 구조를 API 호출로 전달하여 구성 세트와 메시지 태그를 지정합니다.

Amazon SES API 사용과 관련한 자세한 내용은 [Amazon Simple Email Service API 참조](https://docs.aws.amazon.com/ses/latest/APIReference/)를 참조하십시오.

## Amazon SES 지정 이메일 헤더 사용
<a name="event-publishing-using-ses-headers"></a>

`SendRawEmail` 또는 SMTP 인터페이스를 사용하면 Amazon SES 지정 헤더를 이메일에 추가하여 구성 세트와 메시지 태그를 지정할 수 있습니다. Amazon SES는 이메일을 전송하기 전에 해당 이메일에서 헤더를 제거합니다. 다음 표에는 사용할 헤더의 이름이 나와 있습니다.


| 이벤트 게시 정보 | 헤더 | 
| --- | --- | 
|  구성 세트  |  `X-SES-CONFIGURATION-SET`  | 
|  메시지 태그  |  `X-SES-MESSAGE-TAGS`  | 

다음 예제는 Amazon SES에 제출하는 원시 이메일에서 헤더가 어떻게 표시되는지 보여줍니다.

```
 1. X-SES-MESSAGE-TAGS: tagName1=tagValue1, tagName2=tagValue2
 2. X-SES-CONFIGURATION-SET: myConfigurationSet
 3. From: sender@example.com
 4. To: recipient@example.com
 5. Subject: Subject
 6. Content-Type: multipart/alternative;
 7. 	boundary="----=_boundary"
 8. 
 9. ------=_boundary
10. Content-Type: text/plain; charset=UTF-8
11. Content-Transfer-Encoding: 7bit
12. 
13. body
14. ------=_boundary
15. Content-Type: text/html; charset=UTF-8
16. Content-Transfer-Encoding: 7bit
17. 
18. body
19. ------=_boundary--
```

## 사용자 지정 이메일 헤더 사용
<a name="event-publishing-using-custom-headers"></a>

Amazon SES 지정 헤더 `X-SES-CONFIGURATION-SET`을(를) 사용하여 구성 세트 이름을 지정해야 하지만 사용자 고유의 MIME 헤더를 사용하여 메시지 태그를 지정할 수 있습니다.

**참고**  
Amazon SES 이벤트 게시에 사용하는 헤더 이름과 값은 ASCII 형식이어야 합니다. Amazon SES 이벤트 게시에 ASCII가 아닌 헤더 이름이나 값을 지정하면 이메일 전송 호출은 성공하겠지만 이벤트 지표가 Amazon CloudWatch로 내보내지지 않습니다.

# Amazon SES 이벤트 데이터 작업
<a name="working-with-event-data"></a>

[이벤트 게시 설정](monitor-sending-using-event-publishing-setup.md)을 완료하고 이메일 전송을 위한 구성 세트를 지정한 후, 이메일에 연결된 구성 세트를 설정할 때 지정한 이벤트 대상에서 이메일 전송 이벤트를 검색할 수 있습니다.

이 섹션에서는 Amazon CloudWatch 및 Amazon Data Firehose에서 이메일 전송 이벤트를 검색하는 방법과 Amazon SNS에서 제공한 이벤트 데이터를 해석하는 방법을 설명합니다.
+ [CloudWatch에서 Amazon SES 이벤트 데이터 가져오기](event-publishing-retrieving-cloudwatch.md)
+ [Firehose에서 Amazon SES 이벤트 데이터 검색](event-publishing-retrieving-firehose.md)
+ [Amazon SNS의 Amazon SES 이벤트 데이터 해석](event-publishing-retrieving-sns.md)

# CloudWatch에서 Amazon SES 이벤트 데이터 가져오기
<a name="event-publishing-retrieving-cloudwatch"></a>

Amazon SES에서 이메일 전송 이벤트의 지표를 Amazon CloudWatch로 게시할 수 있습니다. CloudWatch에 이벤트 데이터를 게시하면 이러한 지표가 정렬된 시계열 데이터 세트로 제공됩니다. 이러한 지표를 사용해 이메일 전송 성능을 모니터링할 수 있습니다. 예를 들어 수신 거부 측정치를 모니터링하고, 측정치가 특정 값을 초과하면 CloudWatch 경보가 트리거되도록 설정할 수 있습니다.

Amazon SES는 다음 두 가지 세부 수준에서 이러한 이벤트를 CloudWatch에 게시할 수 있습니다.
+ **전체 AWS 계정** - Amazon SES 콘솔 및 `GetSendStatistics` API를 사용하여 모니터링하는 지표에 해당하는 이러한 대략적인 지표는 전체의 합계입니다 AWS 계정. Amazon SES는 이러한 지표를 CloudWatch에 자동으로 게시합니다.
+ **Fine-grained(세부 지표)** – 이 지표는 *메시지 태그*를 사용하여 정의하는 이메일 특성을 기준으로 분류됩니다. 이러한 지표를 CloudWatch에 게시하려면 CloudWatch 이벤트 대상과 함께 [이벤트 게시를 설정](monitor-sending-using-event-publishing-setup.md)하고 이메일을 전송할 때 [구성 세트를 지정](event-publishing-send-email.md)해야 합니다. 또한 메시지 태그를 지정하거나 Amazon SES가 자동으로 제공하는 [자동 태그](monitor-using-event-publishing.md#event-publishing-how-works)를 사용할 수 있습니다.

이 섹션에서는 CloudWatch에서 사용할 수 있는 지표와 이 지표를 보는 방법에 대해 설명합니다.

## 사용 가능한 지표
<a name="event-publishing-retrieving-cloudwatch-metrics"></a>

다음과 같은 Amazon SES 이메일 전송 지표를 CloudWatch에 게시할 수 있습니다.
+ **전송(Send)** - 전송 요청이 성공했으며 Amazon SES는 메시지를 수신자의 메일 서버로 전송합니다. (계정 수준 또는 전역 금지를 사용하는 경우 SES가 여전히 전송으로 계산하지만 배달은 금지합니다.)
+ **렌더링 오류** – 템플릿 렌더링 문제로 인해 이메일이 전송되지 않았습니다. 이 이벤트 유형은 템플릿 데이터가 누락되었을 때 또는 템플릿 파라미터와 데이터 사이에 불일치가 있을 때 발생할 수 있습니다. (이 이벤트 유형은 [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) 또는 [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) API 작업을 사용하는 이메일을 전송할 때만 발생합니다.)
+ **거부(Reject)** - Amazon SES가 이메일을 수락했으나 이메일에 바이러스가 포함된 것으로 판단되어 수신자의 메일 서버로 전송하려고 시도하지 않았습니다.
+ **배달(Delivery)** - Amazon SES에서 이메일을 수신자의 메일 서버로 성공적으로 전송했습니다.
+ **바운스** – 수신자의 메일 서버가 이메일을 영구적으로 거부하는 *하드 바운스*입니다. (*소프트 바운스*는 SES가 더 이상 이메일 전송을 재시도하지 않는 경우에만 포함됩니다. 일반적으로 이러한 소프트 바운스는 전송 실패를 나타내지만, 메일이 수신자의 받은 편지함에 도착하더라도 소프트 바운스가 반환되는 경우도 있습니다. 이러한 상황은 일반적으로 수신자가 부재 중 자동 회신을 보낼 때 발생합니다. [AWS re:Post 문서](https://repost.aws/knowledge-center/ses-understand-soft-bounces)에서 소프트 바운스에 대해 자세히 알아보세요.)
+ **수신 거부(Complaint)** - 이메일이 수신자의 메일 서버로 성공적으로 전송되었지만 수신자가 이를 스팸으로 표시했습니다.
+ **배달 지연** – 일시적인 문제가 발생하여 수신자의 메일 서버에 이메일을 전송할 수 없습니다. 예를 들어 수신자의 받은 편지함이 가득 찼거나 이메일 수신 서버에 일시적인 문제가 발생했을 때 전송 지연이 발생할 수 있습니다.
+ **구독(Subscription)** - 이메일이 성공적으로 배달되었지만 수신자가 이메일 헤더에서 `List-Unsubscribe`를 클릭하거나, 바닥글에서 `Unsubscribe` 링크를 선택하여 구독 기본 설정을 업데이트했습니다.
+ **열기(Open)** – 수신자가 메시지를 수신하여 자신의 이메일 클라이언트에서 열었습니다.
+ **클릭(Click)** – 수신자가 이메일의 링크를 1개 이상 클릭했습니다.

## 사용 가능한 크기
<a name="event-publishing-retrieving-cloudwatch-dimensions"></a>

CloudWatch는 Amazon SES의 구성 세트에 CloudWatch 이벤트 대상을 추가할 때 지정하는 차원 이름을 사용합니다. 자세한 내용은 [이벤트 게시에 필요한 CloudWatch 이벤트 대상 설정](event-publishing-add-event-destination-cloudwatch.md) 섹션을 참조하세요.

## CloudWatch 콘솔에서 Amazon SES 지표 보기
<a name="event-publishing-retrieving-cloudwatch-console"></a>

다음 절차에서는 CloudWatch 콘솔을 사용하여 Amazon SES 이벤트 게시 지표를 보는 방법을 설명합니다.

**CloudWatch 콘솔을 사용하여 지표를 보려면**

1. 에 로그인 AWS Management Console 하고 [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) CloudWatch 콘솔을 엽니다.

1. 필요한 경우 리전을 변경합니다. 탐색 모음에서 AWS 리소스가 있는 리전을 선택합니다. 자세한 설명은 [리전 및 엔드포인트](https://docs.aws.amazon.com/general/latest/gr/rande.html)를 참조하세요.

1. 탐색 창에서 **모든 지표**를 선택합니다.

1. **지표** 창에서 **SES**를 선택합니다.

1. 확인할 지표를 선택합니다. 세부적인 [이벤트 게시 지표](monitor-using-event-publishing.md)를 보려면 [CloudWatch 이벤트 대상을 설정](event-publishing-add-event-destination-cloudwatch.md)할 때 지정한 차원 조합을 선택합니다. CloudWatch를 사용하여 지표를 보는 방법에 대해 자세히 알아보려면 [Amazon CloudWatch 지표 사용](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html)을 참조하세요.

**를 사용하여 지표를 보려면 AWS CLI**
+ 명령 프롬프트에서 다음 명령을 사용합니다.

  ```
  1. aws cloudwatch list-metrics --namespace "AWS/SES"
  ```

# Firehose에서 Amazon SES 이벤트 데이터 검색
<a name="event-publishing-retrieving-firehose"></a>

Amazon SES에서 이메일 전송 이벤트를 Firehose에 JSON 레코드로 게시합니다. 그러면 Firehose는 Firehose에서 전송 스트림을 설정할 때 선택한 AWS 서비스 대상에 레코드를 게시합니다. Firehose 전송 스트림 설정에 대한 자세한 내용은 *Amazon Data Firehose 개발자 가이드*의 [Firehose 전송 스트림 생성](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html)을 참조하세요.

**Topics**
+ [Amazon SES에서 Firehose에 게시하는 이벤트 데이터 콘텐츠](event-publishing-retrieving-firehose-contents.md)
+ [Amazon SES에서 Firehose에 게시하는 이벤트 데이터 예제](event-publishing-retrieving-firehose-examples.md)

# Amazon SES에서 Firehose에 게시하는 이벤트 데이터 콘텐츠
<a name="event-publishing-retrieving-firehose-contents"></a>

Amazon SES에서 이메일 전송 이벤트 레코드를 Amazon Data Firehose에 JSON 형식으로 게시합니다. Firehose에 이벤트를 게시할 때 Amazon SES는 줄바꿈 문자가 포함된 각 JSON 레코드를 따릅니다.

이러한 모든 알림 유형에 대한 레코드 예는 [Amazon SES에서 Firehose에 게시하는 이벤트 데이터 예제](event-publishing-retrieving-firehose-examples.md)에서 찾을 수 있습니다.

**Topics**
+ [최상위 JSON 객체](#event-publishing-retrieving-firehose-contents-top-level-json-object)
+ [Mail 객체](#event-publishing-retrieving-firehose-contents-mail-object)
+ [Bounce 객체](#event-publishing-retrieving-firehose-contents-bounce-object)
+ [Complaint 객체](#event-publishing-retrieving-firehose-contents-complaint-object)
+ [전송 객체](#event-publishing-retrieving-firehose-contents-delivery-object)
+ [Send 객체](#event-publishing-retrieving-firehose-contents-send-object)
+ [Reject 객체](#event-publishing-retrieving-firehose-contents-reject-object)
+ [Open 객체](#event-publishing-retrieving-firehose-contents-open-object)
+ [Click 객체](#event-publishing-retrieving-firehose-contents-click-object)
+ [Rendering Failure 객체](#event-publishing-retrieving-firehose-contents-failure-object)
+ [DeliveryDelay 객체](#event-publishing-retrieving-firehose-delivery-delay-object)
+ [구독 객체](#event-publishing-retrieving-firehose-subscription-object)

## 최상위 JSON 객체
<a name="event-publishing-retrieving-firehose-contents-top-level-json-object"></a>

이메일 전송 이벤트 레코드의 최상위 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `eventType`  |  이벤트 유형을 설명하는 문자열입니다. 가능한 값: `Bounce`, `Complaint`, `Delivery`, `Send`, `Reject`, `Open`, `Click`, `Rendering Failure`, `DeliveryDelay` 또는 `Subscription` [이벤트 게시를 설정](monitor-sending-using-event-publishing-setup.md)하지 않은 경우 이 필드의 이름은 `notificationType`입니다.  | 
|  `mail`  |  이벤트를 만드는 이메일 관련 정보를 포함하는 JSON 객체입니다.  | 
|  `bounce`  |  이 필드는 `eventType`이 `Bounce`인 경우에만 존재합니다. 이 파일에는 반송 관련 정보가 포함되어 있습니다.  | 
|  `complaint`  |  이 필드는 `eventType`이 `Complaint`인 경우에만 존재합니다. 이 파일에는 수신 거부 관련 정보가 포함되어 있습니다.  | 
|  `delivery`  |  이 필드는 `eventType`이 `Delivery`인 경우에만 존재합니다. 이 파일에는 전송 관련 정보가 포함되어 있습니다.  | 
|  `send`  |  이 필드는 `eventType`이 `Send`인 경우에만 존재합니다.  | 
|  `reject`  |  이 필드는 `eventType`이 `Reject`인 경우에만 존재합니다. 이 파일에는 거부 관련 정보가 포함되어 있습니다.  | 
|  `open`  |  이 필드는 `eventType`이 `Open`인 경우에만 존재합니다. 이 파일에는 열기 이벤트 관련 정보가 포함되어 있습니다.  | 
|  `click`  |  이 필드는 `eventType`이 `Click`인 경우에만 존재합니다. 이 파일에는 클릭 이벤트 관련 정보가 포함되어 있습니다.  | 
| `failure` | 이 필드는 `eventType`이 `Rendering Failure`인 경우에만 존재합니다. 이 파일에는 렌더링 오류 이벤트 관련 정보가 포함되어 있습니다. | 
|  `deliveryDelay`  |  이 필드는 `eventType`이 `DeliveryDelay`인 경우에만 존재합니다. 이메일 전송 지연에 대한 정보가 포함되어 있습니다.  | 
|  `subscription`  |  이 필드는 `eventType`이 `Subscription`인 경우에만 존재합니다. 여기에는 구독 기본 설정에 대한 정보가 포함되어 있습니다.  | 

## Mail 객체
<a name="event-publishing-retrieving-firehose-contents-mail-object"></a>

각 이메일 전송 이벤트 레코드는 `mail` 객체에 원래 메일에 대한 정보를 포함하고 있습니다. `mail` 객체 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `timestamp`  |  메시지가 전송된 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `messageId`  |  Amazon SES가 메시지에 할당한 고유 ID입니다. 메시지를 보낼 때 Amazon SES에서 이 값을 반환했습니다.  이 메시지 ID는 Amazon SES에서 할당한 것입니다. `mail` 객체의 `headers` 및 `commonHeaders` 필드에서 원래 메시지의 메시지 ID를 찾을 수 있습니다.   | 
|  `source`  |  메시지를 전송한 이메일 주소(엔벌로프 MAIL FROM 주소).  | 
|  `sourceArn`  |  이메일을 전송하는 데 사용된 ID의 Amazon 리소스 이름(ARN). 권한 부여 전송의 경우 `sourceArn`은 ID 소유자가 위임 발신자에게 메일 전송 시 사용하도록 권한을 부여한 ID의 ARN입니다. 권한 부여 전송에 대한 자세한 내용은 [이메일 인증 방법전송 권한 부여 사용](sending-authorization.md) 섹션을 참조하세요.  | 
|  `sendingAccountId`  |  이메일을 보내는 데 사용된 AWS 계정의 계정 ID입니다. 권한 부여 전송의 경우 `sendingAccountId`는 위임 발신자의 계정 ID입니다.  | 
|  `destination`  |  원래 메일의 수신자인 이메일 주소의 목록.  | 
|  `headersTruncated`  |  알림에서 헤더가 잘렸는지 여부를 나타내는 문자열입니다. 헤더의 용량이 10KB를 초과할 경우 헤더가 잘립니다. 가능한 값은 `true` 및 `false`입니다.  | 
|  `headers`  |  이메일의 원래 헤더 목록입니다. 목록의 각 헤더에는 `name` 필드와 `value` 필드가 존재합니다.  `headers` 필드의 모든 메시지 ID는 Amazon SES에 전달한 원본 메시지에서 가져온 것입니다. 이어서 Amazon SES가 메시지에 할당한 메시지 ID는 `mail` 객체의 `messageId` 필드에 들어 있습니다.   | 
|  `commonHeaders`  |  자주 사용되는 원래 이메일 헤더의 매핑입니다.  `commonHeaders` 필드의 모든 메시지 ID는 Amazon SES가 `mail` 객체의 `messageId` 필드 내 메시지에 할당한 메시지 ID입니다.   | 
|  `tags`  |  이메일과 연결된 태그 목록입니다.  | 

## Bounce 객체
<a name="event-publishing-retrieving-firehose-contents-bounce-object"></a>

`Bounce` 이벤트에 대한 정보를 포함하는 JSON 객체에는 항상 다음 필드가 포함됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `bounceType`  |  Amazon SES가 결정한 반송 메일의 유형.  | 
|  `bounceSubType`  |  Amazon SES가 결정한 반송 메일의 하위 유형.  | 
|  `bouncedRecipients`  |  반송된 원래 메일의 수신자 정보를 포함하는 목록.  | 
|  `timestamp`  |  ISP가 반송 메일 알림을 전송한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `feedbackId`  |  반송 메일의 고유 ID.  | 
|  `reportingMTA`  |  DSN의 `Reporting-MTA` 필드의 값. DSN에서 설명하는 전송, 중계 또는 게이트웨이 작업을 시도하는 메시지 전송 권한(MTA)의 값입니다.  이 필드는 반송 메일에 전송 상태 알림(DSN)이 첨부된 경우에만 표시됩니다.   | 

### 반송 수신자
<a name="event-publishing-retrieving-firehose-contents-bounced-recipients"></a>

반송 이벤트는 단일 수신자 또는 여러 수신자와 관련이 있을 수 있습니다. `bouncedRecipients` 필드는 객체(반송 메일 이벤트가 관련된 수신자당 객체 1개)의 목록을 포함하고 있으며 항상 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `emailAddress`  |  수신자의 이메일 주소. DSN이 사용 가능할 경우, DSN의 `Final-Recipient` 필드의 값입니다.  | 

또는 반송 메일에 DSN이 첨부된 경우 다음 필드도 존재할 수 있습니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `action`  |  DSN의 `Action` 필드의 값. 이 수신자에게 메시지를 전송하려는 시도의 결과로 보고-MTA가 수행하는 작업을 나타냅니다.  | 
|  `status`  |  DSN의 `Status` 필드의 값. 메시지의 전송 상태를 나타내는 수신자별 전송 독립적 상태 코드입니다.  | 
|  `diagnosticCode`  |  보고-MTA가 발행한 상태 코드. DSN의 `Diagnostic-Code` 필드의 값입니다. 이 필드가 DSN에는 없을 수 있습니다(따라서 JSON에도 없음).  | 

### 반송 메일 유형
<a name="event-publishing-retrieving-firehose-contents-bounce-types"></a>

각 반송 메일 이벤트는 다음 표에 나와 있는 유형 중 하나가 됩니다.

이벤트 게시 시스템은 Amazon SES에서 더 이상 재시도하지 않을 하드 바운스 및 소프트 바운스만 게시합니다. `Permanent`로 표시된 반송 메일을 받으면 메일 그룹에서 해당 이메일 주소를 삭제해야 하며 다음부터는 그러한 이메일 주소로 전송할 수 없습니다. `Transient` 반송 메일은 메시지가 여러 번 소프트 바운스되어 Amazon SES에서 이러한 메일에 대해 재전송 시도를 중지한 경우에 전송됩니다. 처음에 `Transient` 반송 메일이 발생한 주소로 이후 전송 재시도가 성공할 수도 있습니다.


| bounceType | bounceSubType | 설명 | 
| --- | --- | --- | 
|  `Undetermined`  |  `Undetermined`  |  Amazon SES가 특정 반송 사유를 결정하지 못했습니다.  | 
|  `Permanent`  |  `General`  |  Amazon SES가 일반 하드 바운스를 수신했습니다. 이 유형의 반송 메일을 받은 경우, 이 수신자의 이메일 주소를 메일 발송 목록에서 삭제해야 합니다.  | 
|  `Permanent`  |  `NoEmail`  |  대상 이메일 주소가 존재하지 않아 Amazon SES가 영구 하드 바운스를 수신했습니다. 이 유형의 반송 메일을 받은 경우, 이 수신자의 이메일 주소를 메일 발송 목록에서 삭제해야 합니다.  | 
|  `Permanent`  |  `Suppressed`  |  최근의 잘못된 주소로 인한 반송 이력 때문에 Amazon SES가 이 주소로 메일 전송을 금지했습니다. 전역 금지 목록을 재정의하려면 [Amazon SES 계정 수준 금지 목록 사용](sending-email-suppression-list.md) 섹션을 참조하세요.  | 
| Permanent | OnAccountSuppressionList | [계정 수준 금지 목록](sending-email-suppression-list.md)에 있으므로 Amazon SES가 이 주소로 보내는 것을 금지했습니다. 이는 반송 비율 지표에 반영되지 않습니다. | 
|  `Transient`  |  `General`  |  Amazon SES가 일반 반송 메일을 수신했습니다. 이후에 이 수신자에게 전송이 성공할 수도 있습니다.  | 
|  `Transient`  |  `MailboxFull`  |  Amazon SES가 메일박스 가득 참 반송 메일을 수신했습니다. 이후에 이 수신자에게 전송이 성공할 수도 있습니다.  | 
|  `Transient`  |  `MessageTooLarge`  |  Amazon SES가 메시지 너무 큼 반송 메일을 수신했습니다. 메시지 크기를 줄일 경우 이 수신자에게 전송이 성공할 수도 있습니다.  | 
|  `Transient`  |  `CustomTimeoutExceeded`  |  Amazon SES가 이메일 발신자가 지정한 시간 내에 이메일을 성공적으로 전송하지 못했습니다. *(반송 메시지는 정의된 TTL 내에서 가능한 전송 시도 실패의 이유를 지정합니다.)*   | 
|  `Transient`  |  `ContentRejected`  |  Amazon SES가 내용 거부 반송 메일을 수신했습니다. 메시지 내용을 변경할 경우 이 수신자에게 전송이 성공할 수도 있습니다.  | 
|  `Transient`  |  `AttachmentRejected`  |  Amazon SES가 첨부 파일 거부 반송 메일을 수신했습니다. 첨부 파일을 제거하거나 변경할 경우 이 수신자에게 전송이 성공할 수도 있습니다.  | 

## Complaint 객체
<a name="event-publishing-retrieving-firehose-contents-complaint-object"></a>

`Complaint` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `complainedRecipients`  |  수신 거부를 제출했을 수 있는 수신자에 대한 정보를 포함하는 목록.  | 
|  `timestamp`  |  ISP가 수신 거부 알림을 전송한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `feedbackId`  |  수신 거부의 고유 ID.  | 
|  `complaintSubType`  |  Amazon SES가 결정한 수신 거부의 하위 유형.  | 

또한, 수신 거부에 피드백 보고서가 첨부된 경우 다음 필드가 포함될 수 있습니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `userAgent`  |  피드백 보고서의 `User-Agent` 필드의 값입니다. 보고서를 생성한 시스템의 이름 및 버전을 나타냅니다.  | 
|  `complaintFeedbackType`  |  ISP로부터 수신된 피드백 보고서의 `Feedback-Type` 필드의 값. 이 값은 피드백의 유형을 포함합니다.  | 
|  `arrivalDate`  |  피드백 보고서의 `Arrival-Date` 또는 `Received-Date` 필드 값으로 ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)입니다. 이 필드가 보고서에는 없을 수 있습니다(따라서 JSON에도 없음).  | 

### 수신 거부한 수신자
<a name="event-publishing-retrieving-firehose-contents-complained-recipients"></a>

`complainedRecipients` 필드는 수신 거부를 제출했을 수 있는 수신자의 목록을 포함합니다.

**중요**  
대부분의 ISP가 수신 거부를 제출한 수신자의 이메일 주소를 수신 거부 알림에서 삭제하므로, 이 목록에는 원래 메시지의 수신자 그리고 수신 거부를 보낸 ISP를 기준으로 수신 거부를 제출했을 수 있는 수신자의 목록이 포함되어 있습니다. Amazon SES는 원래 메시지를 조회하여 이 수신자 목록을 결정합니다.

이 목록의 JSON 객체는 다음 필드를 포함합니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `emailAddress`  |  수신자의 이메일 주소.  | 

### 수신 거부 유형
<a name="event-publishing-retrieving-firehose-contents-complaint-types"></a>

[Internet Assigned Numbers Authority 웹사이트](https://www.iana.org/assignments/marf-parameters/marf-parameters.xml#marf-parameters-2):에 따라 `complaintFeedbackType` 필드에 보고 ISP가 할당한 다음과 같은 수신 거부 유형이 나타날 수 있습니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `abuse`  |  원치 않는 이메일 또는 기타 유형의 이메일 침해를 나타냅니다.  | 
|  `auth-failure`  |  이메일 인증 실패 보고서.  | 
|  `fraud`  |  일종의 사기 또는 피싱 활동을 나타냅니다.  | 
|  `not-spam`  |  보고서를 제공하는 엔터티가 메시지를 스팸으로 간주하지 않음을 나타냅니다. 이는 스팸으로 잘못 태그 지정 또는 분류된 메시지를 교정하기 위해 사용될 수 있습니다.  | 
|  `other`  |  다른 등록된 유형에 들어맞지 않는 기타 피드백을 나타냅니다.  | 
|  `virus`  |  발원 메시지에서 바이러스가 발견되었다는 보고서.  | 

## 전송 객체
<a name="event-publishing-retrieving-firehose-contents-delivery-object"></a>

`Delivery` 이벤트에 대한 정보를 포함하는 JSON 객체에는 항상 다음 필드가 포함됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `timestamp`  |  Amazon SES가 수신자의 메일 서버로 이메일을 전송한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `processingTimeMillis`  |  Amazon SES가 발신자로부터 요청을 수락한 때로부터 Amazon SES가 수신자의 메일 서버로 메시지를 전송한 때까지의 시간(단위: 밀리초).  | 
|  `recipients`  |  전송 이벤트가 적용되는 의도한 수신자의 목록.  | 
|  `smtpResponse`  |  Amazon SES로부터 이메일을 수락한 원격 ISP의 SMTP 응답 메시지. 이 메시지는 이메일, 수신 메일 서버, 수신 ISP마다 다릅니다.  | 
|  `reportingMTA`  |  메일을 전송한 Amazon SES 메일 서버의 호스트 이름.  | 
|  `remoteMtaIp`  |  Amazon SES에서 이메일을 전송한 MTA의 IP 주소입니다.  | 

## Send 객체
<a name="event-publishing-retrieving-firehose-contents-send-object"></a>

`send` 이벤트 정보를 포함하는 JSON 객체는 항상 비어 있습니다.

## Reject 객체
<a name="event-publishing-retrieving-firehose-contents-reject-object"></a>

`Reject` 이벤트에 대한 정보를 포함하는 JSON 객체에는 항상 다음 필드가 포함됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `reason`  |  이메일이 거부된 이유입니다. 유일하게 가능한 값은 `Bad content`로, Amazon SES가 바이러스 포함 이메일을 감지했다는 뜻입니다. 메시지가 거부되면 Amazon SES는 메시지 처리를 중지하고 해당 메시지를 수신자의 메일 서버로 전송하지 않습니다.  | 

## Open 객체
<a name="event-publishing-retrieving-firehose-contents-open-object"></a>

`Open` 이벤트에 대한 정보를 포함하는 JSON 객체는 항상 다음 필드를 포함합니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `ipAddress`  |  수신자의 IP 주소입니다.  | 
|  `timestamp`  |  열기 이벤트가 발생한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `userAgent`  |  수신자가 이메일을 여는 데 사용한 이메일 클라이언트 또는 디바이스의 사용자 에이전트입니다.  | 

## Click 객체
<a name="event-publishing-retrieving-firehose-contents-click-object"></a>

`Click` 이벤트에 대한 정보를 포함하는 JSON 객체는 항상 다음 필드를 포함합니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `ipAddress`  |  수신자의 IP 주소입니다.  | 
|  `timestamp`  |  클릭 이벤트가 발생한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `userAgent`  |  수신자가 이메일의 링크를 클릭하는 데 사용한 클라이언트의 사용자 에이전트입니다.  | 
|  `link`  |  수신자가 클릭한 링크의 URL입니다.  | 
|  `linkTags`  |  `ses:tags` 속성을 사용하여 링크에 추가된 태그 목록입니다. 이메일의 링크에 태그를 추가하는 방법은 [Q5. 링크에 고유 식별자로 태그를 지정할 수 있습니까?](faqs-metrics.md#sending-metric-faqs-clicks-q5)의 [Amazon SES 이메일 전송 지표 FAQ](faqs-metrics.md) 섹션을 참조하세요.  | 

## Rendering Failure 객체
<a name="event-publishing-retrieving-firehose-contents-failure-object"></a>

`Rendering Failure` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `templateName`  |  이메일을 전송하는 데 사용하는 템플릿의 이름입니다.  | 
|  `errorMessage`  |  렌더링 오류에 관한 자세한 정보를 제공하는 메시지입니다.  | 

## DeliveryDelay 객체
<a name="event-publishing-retrieving-firehose-delivery-delay-object"></a>

`DeliveryDelay` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `delayType`  |  지연 유형입니다. 가능한 값은 다음과 같습니다. [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/ses/latest/dg/event-publishing-retrieving-firehose-contents.html)  | 
|  `delayedRecipients`  |  이메일 수신자에 대한 정보가 있는 객체입니다.  | 
|  `expirationTime`  |  Amazon SES에서 메시지 전송 시도를 중지할 날짜 및 시간입니다. 이 값은 ISO 8601 형식으로 표시됩니다.  | 
|  `reportingMTA`  |  지연을 보고한 MTA(메시지 전송 에이전트) 의 IP 주소입니다.  | 
|  `timestamp`  |  지연이 발생한 날짜 및 시간으로 ISO 8601 형식으로 표시됩니다.  | 

### 지연된 수신자
<a name="event-publishing-retrieving-firehose-contents-delivery-delay-object-recipients"></a>

`delayedRecipients` 객체는 다음 값을 포함합니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `emailAddress`  |  메시지 전송이 지연된 이메일 주소입니다.  | 
|  `status`  |  전송 지연 관련된 SMTP 상태 코드입니다.  | 
|  `diagnosticCode`  |  수신 메시지 전송 에이전트(MTA)에서 제공하는 진단 코드입니다.  | 

## 구독 객체
<a name="event-publishing-retrieving-firehose-subscription-object"></a>

`Subscription` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `contactList`  |  연락처가 있는 목록의 이름입니다.  | 
|  `timestamp`  |  ISP가 구독 알림을 전송한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `source`  |  메시지를 전송한 이메일 주소(엔벌로프 MAIL FROM 주소).  | 
|  `newTopicPreferences`  |  연락처 목록에 있는 모든 주제의 구독 상태를 지정하는 JSON 데이터 구조(맵)로, 변경 후 상태를 나타냅니다(연락처 구독함 또는 구독 취소함).  | 
|  `oldTopicPreferences`  |  연락처 목록에 있는 모든 주제의 구독 상태를 지정하는 JSON 데이터 구조(맵)로, 변경 전 상태를 나타냅니다(연락처 구독함 또는 구독 취소함).  | 

### 신규/이전 주제 기본 설정
<a name="event-publishing-retrieving-firehose-contents-subscription-object-topic-preferences"></a>

`newTopicPreferences` 및 `oldTopicPreferences` 객체는 다음 값을 포함합니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `unsubscribeAll`  |  연락처 목록의 모든 주제에서 연락처가 구독을 취소했는지를 지정합니다.  | 
|  `topicSubscriptionStatus`  |  지정된 이벤트 유형에 대해 현재 SES로부터 알림을 수신하도록 구독하고 있는지를 나타내는 `topicName` 필드에서 주제의 구독 상태를 지정합니다. `subscriptionStatus` 필드에서 사용 가능한 값은 **OptIn**(구독) 또는 **OptOut**(구독 취소)입니다.  | 
|  `topicDefaultSubscriptionStatus`  |  `topicName` 필드에서 주제의 기본 구독 상태를 지정하여 이벤트 대상에 추가된 새 주제를 기본적으로 구독할지 아니면 구독 취소할지 결정합니다. `subscriptionStatus` 필드에서 사용 가능한 값은 **OptIn**(기본적으로 구독) 또는 **OptOut**(기본적으로 구독 취소)입니다.  | 

# Amazon SES에서 Firehose에 게시하는 이벤트 데이터 예제
<a name="event-publishing-retrieving-firehose-examples"></a>

이 섹션에서는 Amazon SES가 Firehose에 게시하는 이메일 전송 이벤트 레코드의 유형별 예제를 제공합니다.

**Topics**
+ [Bounce 레코드](#event-publishing-retrieving-firehose-bounce)
+ [Complaint 레코드](#event-publishing-retrieving-firehose-complaint)
+ [Delivery 레코드](#event-publishing-retrieving-firehose-delivery)
+ [Send 레코드](#event-publishing-retrieving-firehose-send)
+ [Reject 레코드](#event-publishing-retrieving-firehose-reject)
+ [Open 레코드](#event-publishing-retrieving-firehose-open)
+ [Click 레코드](#event-publishing-retrieving-firehose-click)
+ [Rendering Failure 레코드](#event-publishing-retrieving-firehose-failure)
+ [DeliveryDelay 레코드](#event-publishing-retrieving-firehose-delayed-delivery)
+ [구독 레코드](#event-publishing-retrieving-firehose-subscription)

**참고**  
다음 예제에서는 `tag` 필드가 사용되며, SES가 모든 이벤트 유형에 대한 태그 게시를 지원하는 구성 집합을 통해 이벤트 게시를 사용하고 있습니다. ID에 직접 피드백 알림을 사용하는 경우 SES는 태그를 게시하지 않습니다. [구성 세트 생성](creating-configuration-sets.md) 또는 [구성 세트 수정](managing-configuration-sets.md#console-detail-configuration-sets) 작업을 할 때 태그 추가하기에 대해 읽어보세요.

## Bounce 레코드
<a name="event-publishing-retrieving-firehose-bounce"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Bounce` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType":"Bounce",
 3.   "bounce":{
 4.     "bounceType":"Permanent",
 5.     "bounceSubType":"General",
 6.     "bouncedRecipients":[
 7.       {
 8.         "emailAddress":"recipient@example.com",
 9.         "action":"failed",
10.         "status":"5.1.1",
11.         "diagnosticCode":"smtp; 550 5.1.1 user unknown"
12.       }
13.     ],
14.     "timestamp":"2017-08-05T00:41:02.669Z",
15.     "feedbackId":"01000157c44f053b-61b59c11-9236-11e6-8f96-7be8aexample-000000",
16.     "reportingMTA":"dsn; mta.example.com"
17.   },
18.   "mail":{
19.     "timestamp":"2017-08-05T00:40:02.012Z",
20.     "source":"Sender Name <sender@example.com>",
21.     "sourceArn":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
22.     "sendingAccountId":"123456789012",
23.     "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
24.     "destination":[
25.       "recipient@example.com"
26.     ],
27.     "headersTruncated":false,
28.     "headers":[
29.       {
30.         "name":"From",
31.         "value":"Sender Name <sender@example.com>"
32.       },
33.       {
34.         "name":"To",
35.         "value":"recipient@example.com"
36.       },
37.       {
38.         "name":"Subject",
39.         "value":"Message sent from Amazon SES"
40.       },
41.       {
42.         "name":"MIME-Version",
43.         "value":"1.0"
44.       },
45.       {
46.         "name":"Content-Type",
47.         "value":"multipart/alternative; boundary=\"----=_Part_7307378_1629847660.1516840721503\""
48.       }
49.     ],
50.     "commonHeaders":{
51.       "from":[
52.         "Sender Name <sender@example.com>"
53.       ],
54.       "to":[
55.         "recipient@example.com"
56.       ],
57.       "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
58.       "subject":"Message sent from Amazon SES"
59.     },
60.     "tags":{
61.       "ses:configuration-set":[
62.         "ConfigSet"
63.       ],
64.       "ses:source-ip":[
65.         "192.0.2.0"
66.       ],
67.       "ses:from-domain":[
68.         "example.com"
69.       ],
70.       "ses:caller-identity":[
71.         "ses_user"
72.       ]
73.     }
74.   }
75. }
```

## Complaint 레코드
<a name="event-publishing-retrieving-firehose-complaint"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Complaint` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType":"Complaint",
 3.   "complaint": {
 4.     "complainedRecipients":[
 5.       {
 6.         "emailAddress":"recipient@example.com"
 7.       }
 8.     ],
 9.     "timestamp":"2017-08-05T00:41:02.669Z",
10.     "feedbackId":"01000157c44f053b-61b59c11-9236-11e6-8f96-7be8aexample-000000",
11.     "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36",
12.     "complaintFeedbackType":"abuse",
13.     "arrivalDate":"2017-08-05T00:41:02.669Z"
14.   },
15.   "mail":{
16.     "timestamp":"2017-08-05T00:40:01.123Z",
17.     "source":"Sender Name <sender@example.com>",
18.     "sourceArn":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
19.     "sendingAccountId":"123456789012",
20.     "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
21.     "destination":[
22.       "recipient@example.com"
23.     ],
24.     "headersTruncated":false,
25.     "headers":[
26.       {
27.         "name":"From",
28.         "value":"Sender Name <sender@example.com>"
29.       },
30.       {
31.         "name":"To",
32.         "value":"recipient@example.com"
33.       },
34.       {
35.         "name":"Subject",
36.         "value":"Message sent from Amazon SES"
37.       },
38.       {
39.         "name":"MIME-Version","value":"1.0"
40.       },
41.       {
42.         "name":"Content-Type",
43.         "value":"multipart/alternative; boundary=\"----=_Part_7298998_679725522.1516840859643\""
44.       }
45.     ],
46.     "commonHeaders":{
47.       "from":[
48.         "Sender Name <sender@example.com>"
49.       ],
50.       "to":[
51.         "recipient@example.com"
52.       ],
53.       "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
54.       "subject":"Message sent from Amazon SES"
55.     },
56.     "tags":{
57.       "ses:configuration-set":[
58.         "ConfigSet"
59.       ],
60.       "ses:source-ip":[
61.         "192.0.2.0"
62.       ],
63.       "ses:from-domain":[
64.         "example.com"
65.       ],
66.       "ses:caller-identity":[
67.         "ses_user"
68.       ]
69.     }
70.   }
71. }
```

## Delivery 레코드
<a name="event-publishing-retrieving-firehose-delivery"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Delivery` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Delivery",
 3.   "mail": {
 4.     "timestamp": "2016-10-19T23:20:52.240Z",
 5.     "source": "sender@example.com",
 6.     "sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId": "123456789012",
 8.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination": [
10.       "recipient@example.com"
11.     ],
12.     "headersTruncated": false,
13.     "headers": [
14.       {
15.         "name": "From",
16.         "value": "sender@example.com"
17.       },
18.       {
19.         "name": "To",
20.         "value": "recipient@example.com"
21.       },
22.       {
23.         "name": "Subject",
24.         "value": "Message sent from Amazon SES"
25.       },
26.       {
27.         "name": "MIME-Version",
28.         "value": "1.0"
29.       },
30.       {
31.         "name": "Content-Type",
32.         "value": "text/html; charset=UTF-8"
33.       },
34.       {
35.         "name": "Content-Transfer-Encoding",
36.         "value": "7bit"
37.       }
38.     ],
39.     "commonHeaders": {
40.       "from": [
41.         "sender@example.com"
42.       ],
43.       "to": [
44.         "recipient@example.com"
45.       ],
46.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
47.       "subject": "Message sent from Amazon SES"
48.     },
49.     "tags": {
50.       "ses:configuration-set": [
51.         "ConfigSet"
52.       ],
53.       "ses:source-ip": [
54.         "192.0.2.0"
55.       ],
56.       "ses:from-domain": [
57.         "example.com"
58.       ],
59.       "ses:caller-identity": [
60.         "ses_user"
61.       ],
62.       "ses:outgoing-ip": [
63.         "192.0.2.0"
64.       ],
65.       "myCustomTag1": [
66.         "myCustomTagValue1"
67.       ],
68.       "myCustomTag2": [
69.         "myCustomTagValue2"
70.       ]      
71.     }
72.   },
73.   "delivery": {
74.     "timestamp": "2016-10-19T23:21:04.133Z",
75.     "processingTimeMillis": 11893,
76.     "recipients": [
77.       "recipient@example.com"
78.     ],
79.     "smtpResponse": "250 2.6.0 Message received",
80.     "remoteMtaIp": "123.456.789.012",
81.     "reportingMTA": "mta.example.com"
82.   }
83. }
```

## Send 레코드
<a name="event-publishing-retrieving-firehose-send"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Send` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Send",
 3.   "mail": {
 4.     "timestamp": "2016-10-14T05:02:16.645Z",
 5.     "source": "sender@example.com",
 6.     "sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId": "123456789012",
 8.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination": [
10.       "recipient@example.com"
11.     ],
12.     "headersTruncated": false,
13.     "headers": [
14.       {
15.         "name": "From",
16.         "value": "sender@example.com"
17.       },
18.       {
19.         "name": "To",
20.         "value": "recipient@example.com"
21.       },
22.       {
23.         "name": "Subject",
24.         "value": "Message sent from Amazon SES"
25.       },
26.       {
27.         "name": "MIME-Version",
28.         "value": "1.0"
29.       },
30.       {
31.         "name": "Content-Type",
32.         "value": "multipart/mixed;  boundary=\"----=_Part_0_716996660.1476421336341\""
33.       },
34.       {
35.         "name": "X-SES-MESSAGE-TAGS",
36.         "value": "myCustomTag1=myCustomTagValue1, myCustomTag2=myCustomTagValue2"
37.       }
38.     ],
39.     "commonHeaders": {
40.       "from": [
41.         "sender@example.com"
42.       ],
43.       "to": [
44.         "recipient@example.com"
45.       ],
46.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
47.       "subject": "Message sent from Amazon SES"
48.     },
49.     "tags": {
50.       "ses:configuration-set": [
51.         "ConfigSet"
52.       ],
53.       "ses:source-ip": [
54.         "192.0.2.0"
55.       ],
56.       "ses:from-domain": [
57.         "example.com"
58.       ],      
59.       "ses:caller-identity": [
60.         "ses_user"
61.       ],
62.       "myCustomTag1": [
63.         "myCustomTagValue1"
64.       ],
65.       "myCustomTag2": [
66.         "myCustomTagValue2"
67.       ]      
68.     }
69.   },
70.   "send": {}
71. }
```

## Reject 레코드
<a name="event-publishing-retrieving-firehose-reject"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Reject` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Reject",
 3.   "mail": {
 4.     "timestamp": "2016-10-14T17:38:15.211Z",
 5.     "source": "sender@example.com",
 6.     "sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId": "123456789012",
 8.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination": [
10.       "sender@example.com"
11.     ],
12.     "headersTruncated": false,
13.     "headers": [
14.       {
15.         "name": "From",
16.         "value": "sender@example.com"
17.       },
18.       {
19.         "name": "To",
20.         "value": "recipient@example.com"
21.       },      
22.       {
23.         "name": "Subject",
24.         "value": "Message sent from Amazon SES"
25.       },
26.       {
27.         "name": "MIME-Version",
28.         "value": "1.0"
29.       },      
30.       {
31.         "name": "Content-Type",
32.         "value": "multipart/mixed; boundary=\"qMm9M+Fa2AknHoGS\""
33.       },
34.       {
35.         "name": "X-SES-MESSAGE-TAGS",
36.         "value": "myCustomTag1=myCustomTagValue1, myCustomTag2=myCustomTagValue2"
37.       }  
38.     ],
39.     "commonHeaders": {
40.       "from": [
41.         "sender@example.com"
42.       ],
43.       "to": [
44.         "recipient@example.com"
45.       ],
46.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
47.       "subject": "Message sent from Amazon SES"
48.     },
49.     "tags": {
50.       "ses:configuration-set": [
51.         "ConfigSet"
52.       ],
53.       "ses:source-ip": [
54.         "192.0.2.0"
55.       ],
56.       "ses:from-domain": [
57.         "example.com"
58.       ],    
59.       "ses:caller-identity": [
60.         "ses_user"
61.       ],
62.       "myCustomTag1": [
63.         "myCustomTagValue1"
64.       ],
65.       "myCustomTag2": [
66.         "myCustomTagValue2"
67.       ]      
68.     }
69.   },
70.   "reject": {
71.     "reason": "Bad content"
72.   }
73. }
```

## Open 레코드
<a name="event-publishing-retrieving-firehose-open"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Open` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Open",
 3.   "mail": {
 4.     "commonHeaders": {
 5.       "from": [
 6.         "sender@example.com"
 7.       ],
 8.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.       "subject": "Message sent from Amazon SES",
10.       "to": [
11.         "recipient@example.com"
12.       ]
13.     },
14.     "destination": [
15.       "recipient@example.com"
16.     ],
17.     "headers": [
18.       {
19.         "name": "X-SES-CONFIGURATION-SET",
20.         "value": "ConfigSet"
21.       },
22.       {
23.         "name":"X-SES-MESSAGE-TAGS",
24.         "value":"myCustomTag1=myCustomValue1, myCustomTag2=myCustomValue2"
25.       },
26.       {
27.         "name": "From",
28.         "value": "sender@example.com"
29.       },
30.       {
31.         "name": "To",
32.         "value": "recipient@example.com"
33.       },
34.       {
35.         "name": "Subject",
36.         "value": "Message sent from Amazon SES"
37.       },
38.       {
39.         "name": "MIME-Version",
40.         "value": "1.0"
41.       },
42.       {
43.         "name": "Content-Type",
44.         "value": "multipart/alternative; boundary=\"XBoundary\""
45.       }
46.     ],
47.     "headersTruncated": false,
48.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
49.     "sendingAccountId": "123456789012",
50.     "source": "sender@example.com",
51.     "tags": {
52.       "myCustomTag1":[
53.         "myCustomValue1"
54.       ],
55.       "myCustomTag2":[
56.         "myCustomValue2"
57.       ],
58.       "ses:caller-identity": [
59.         "IAM_user_or_role_name"
60.       ],
61.       "ses:configuration-set": [
62.         "ConfigSet"
63.       ],
64.       "ses:from-domain": [
65.         "example.com"
66.       ],
67.       "ses:source-ip": [
68.         "192.0.2.0"
69.       ]
70.     },
71.     "timestamp": "2017-08-09T21:59:49.927Z"
72.   },
73.   "open": {
74.     "ipAddress": "192.0.2.1",
75.     "timestamp": "2017-08-09T22:00:19.652Z",
76.     "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60"
77.   }
78. }
```

## Click 레코드
<a name="event-publishing-retrieving-firehose-click"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Click` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Click",
 3.   "click": {
 4.     "ipAddress": "192.0.2.1",
 5.     "link": "http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp.html",
 6.     "linkTags": {
 7.       "samplekey0": [
 8.         "samplevalue0"
 9.       ],
10.       "samplekey1": [
11.         "samplevalue1"
12.       ]
13.     },
14.     "timestamp": "2017-08-09T23:51:25.570Z",
15.     "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"
16.   },
17.   "mail": {
18.     "commonHeaders": {
19.       "from": [
20.         "sender@example.com"
21.       ],
22.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
23.       "subject": "Message sent from Amazon SES",
24.       "to": [
25.         "recipient@example.com"
26.       ]
27.     },
28.     "destination": [
29.       "recipient@example.com"
30.     ],
31.     "headers": [
32.       {
33.         "name": "X-SES-CONFIGURATION-SET",
34.         "value": "ConfigSet"
35.       },
36.       {
37.         "name":"X-SES-MESSAGE-TAGS",
38.         "value":"myCustomTag1=myCustomValue1, myCustomTag2=myCustomValue2"
39.       },
40.       {
41.         "name": "From",
42.         "value": "sender@example.com"
43.       },
44.       {
45.         "name": "To",
46.         "value": "recipient@example.com"
47.       },
48.       {
49.         "name": "Subject",
50.         "value": "Message sent from Amazon SES"
51.       },
52.       {
53.         "name": "MIME-Version",
54.         "value": "1.0"
55.       },
56.       {
57.         "name": "Content-Type",
58.         "value": "multipart/alternative; boundary=\"XBoundary\""
59.       },
60.       {
61.         "name": "Message-ID",
62.         "value": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000"
63.       }
64.     ],
65.     "headersTruncated": false,
66.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
67.     "sendingAccountId": "123456789012",
68.     "source": "sender@example.com",
69.     "tags": {
70.       "myCustomTag1":[
71.         "myCustomValue1"
72.       ],
73.       "myCustomTag2":[
74.         "myCustomValue2"
75.       ],
76.       "ses:caller-identity": [
77.         "ses_user"
78.       ],
79.       "ses:configuration-set": [
80.         "ConfigSet"
81.       ],
82.       "ses:from-domain": [
83.         "example.com"
84.       ],
85.       "ses:source-ip": [
86.         "192.0.2.0"
87.       ]
88.     },
89.     "timestamp": "2017-08-09T23:50:05.795Z"
90.   }
91. }
```

## Rendering Failure 레코드
<a name="event-publishing-retrieving-firehose-failure"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Rendering Failure` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType":"Rendering Failure",
 3.   "mail":{
 4.     "timestamp":"2018-01-22T18:43:06.197Z",
 5.     "source":"sender@example.com",
 6.     "sourceArn":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId":"123456789012",
 8.     "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination":[
10.       "recipient@example.com"
11.     ],
12.     "headersTruncated":false,
13.     "tags":{
14.       "ses:configuration-set":[
15.         "ConfigSet"
16.       ]
17.     }
18.   },
19.   "failure":{
20.     "errorMessage":"Attribute 'attributeName' is not present in the rendering data.",
21.     "templateName":"MyTemplate"
22.   }
23. }
```

## DeliveryDelay 레코드
<a name="event-publishing-retrieving-firehose-delayed-delivery"></a>

다음은 Amazon SES가 Firehose에 게시하는 `DeliveryDelay` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "DeliveryDelay",
 3.   "mail":{
 4.     "timestamp":"2020-06-16T00:15:40.641Z",
 5.     "source":"sender@example.com",
 6.     "sourceArn":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId":"123456789012",
 8.     "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination":[
10.       "recipient@example.com"
11.     ],
12.     "headersTruncated":false,
13.     "tags":{
14.       "ses:configuration-set":[
15.         "ConfigSet"
16.       ]
17.     }
18.   },
19.   "deliveryDelay": {
20.     "timestamp": "2020-06-16T00:25:40.095Z",
21.     "delayType": "TransientCommunicationFailure",
22.     "expirationTime": "2020-06-16T00:25:40.914Z",
23.     "delayedRecipients": [{
24.       "emailAddress": "recipient@example.com",
25.       "status": "4.4.1",
26.       "diagnosticCode": "smtp; 421 4.4.1 Unable to connect to remote host"
27.     }]
28.   }
29. }
```

## 구독 레코드
<a name="event-publishing-retrieving-firehose-subscription"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Subscription` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Subscription",
 3.   "mail": {
 4.     "timestamp": "2022-01-12T01:00:14.340Z",
 5.     "source": "sender@example.com",
 6.     "sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId": "123456789012",
 8.     "messageId": "EXAMPLEe4bccb684-777bc8de-afa7-4970-92b0-f515137b1497-000000",
 9.     "destination": ["recipient@example.com"],
10.     "headersTruncated": false,
11.     "headers": [
12.       {
13.         "name": "From",
14.         "value": "sender@example.com"
15.       },
16.       {
17.         "name": "To",
18.         "value": "recipient@example.com"
19.       },
20.       {
21.         "name": "Subject",
22.         "value": "Message sent from Amazon SES"
23.       },
24.       {
25.         "name": "MIME-Version",
26.         "value": "1.0"
27.       },
28.       {
29.         "name": "Content-Type",
30.         "value": "text/html; charset=UTF-8"
31.       },
32.       {
33.         "name": "Content-Transfer-Encoding",
34.         "value": "7bit"
35.       }
36.     ],
37.     "commonHeaders": {
38.       "from": ["sender@example.com"],
39.       "to": ["recipient@example.com"],
40.       "messageId": "EXAMPLEe4bccb684-777bc8de-afa7-4970-92b0-f515137b1497-000000",
41.       "subject": "Message sent from Amazon SES"
42.     },
43.     "tags": {
44.       "ses:operation": ["SendEmail"],
45.       "ses:configuration-set": ["ConfigSet"],
46.       "ses:source-ip": ["192.0.2.0"],
47.       "ses:from-domain": ["example.com"],
48.       "ses:caller-identity": ["ses_user"],
49.       "myCustomTag1": ["myCustomValue1"],
50.       "myCustomTag2": ["myCustomValue2"]
51.     }
52.   },
53.   "subscription": {
54.     "contactList": "ContactListName",
55.     "timestamp": "2022-01-12T01:00:17.910Z",
56.     "source": "UnsubscribeHeader",
57.     "newTopicPreferences": {
58.       "unsubscribeAll": true,
59.       "topicSubscriptionStatus": [
60.         {
61.           "topicName": "ExampleTopicName",
62.           "subscriptionStatus": "OptOut"
63.         }
64.       ]
65.     },
66.     "oldTopicPreferences": {
67.       "unsubscribeAll": false,
68.       "topicSubscriptionStatus": [
69.         {
70.           "topicName": "ExampleTopicName",
71.           "subscriptionStatus": "OptOut"
72.         }
73.       ]
74.     }
75.   }
76. }
```

# Amazon SNS의 Amazon SES 이벤트 데이터 해석
<a name="event-publishing-retrieving-sns"></a>

Amazon SES는 이메일 전송 이벤트를 Amazon Simple Notification Service(Amazon SNS)에 JSON 레코드로 게시합니다. 그런 다음 Amazon SNS는 이벤트 대상과 연결된 Amazon SNS 주제를 구독하는 엔드포인트에 알림을 보냅니다. Amazon SNS 주제 설정 및 구독에 대한 자세한 내용은 *Amazon Simple Notification Service 개발자 가이드*의 [시작하기](https://docs.aws.amazon.com/sns/latest/dg/GettingStarted.html)를 참조하십시오.

레코드 콘텐츠에 대한 설명과 레코드 예제는 다음 단원을 참조하세요.
+ [이벤트 레코드 내용](event-publishing-retrieving-sns-contents.md)
+ [이벤트 레코드 예제](event-publishing-retrieving-sns-examples.md)

# Amazon SES가 Amazon SNS에 게시하는 이벤트 데이터 내용
<a name="event-publishing-retrieving-sns-contents"></a>

Amazon SES는 이메일 전송 이벤트 레코드를 Amazon Simple Notification Service(Amazon SNS)에 JSON 형식으로 게시합니다.

이러한 모든 알림 유형에 대한 레코드 예는 [Amazon SES가 Amazon SNS에 게시하는 이벤트 데이터 예제](event-publishing-retrieving-sns-examples.md)에서 찾을 수 있습니다.

**Topics**
+ [최상위 JSON 객체](#event-publishing-retrieving-sns-contents-top-level-json-object)
+ [Mail 객체](#event-publishing-retrieving-sns-contents-mail-object)
+ [Bounce 객체](#event-publishing-retrieving-sns-contents-bounce-object)
+ [Complaint 객체](#event-publishing-retrieving-sns-contents-complaint-object)
+ [전송 객체](#event-publishing-retrieving-sns-contents-delivery-object)
+ [Send 객체](#event-publishing-retrieving-sns-contents-send-object)
+ [Reject 객체](#event-publishing-retrieving-sns-contents-reject-object)
+ [Open 객체](#event-publishing-retrieving-sns-contents-open-object)
+ [Click 객체](#event-publishing-retrieving-sns-contents-click-object)
+ [Rendering Failure 객체](#event-publishing-retrieving-sns-contents-failure-object)
+ [DeliveryDelay 객체](#event-publishing-retrieving-sns-contents-delivery-delay-object)
+ [구독 객체](#event-publishing-retrieving-sns-contents-subscription-object)

## 최상위 JSON 객체
<a name="event-publishing-retrieving-sns-contents-top-level-json-object"></a>

이메일 전송 이벤트 레코드의 최상위 JSON 객체는 다음 필드로 구성됩니다. 이벤트 유형에 따라 존재하는 다른 객체가 결정됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `eventType`  |  이벤트 유형을 설명하는 문자열입니다. 가능한 값: `Bounce`, `Complaint`, `Delivery`, `Send`, `Reject`, `Open`, `Click`, `Rendering Failure`, `DeliveryDelay` 또는 `Subscription` [이벤트 게시를 설정](monitor-sending-using-event-publishing-setup.md)하지 않은 경우 이 필드의 이름은 `notificationType`입니다.  | 
|  `mail`  |  이벤트를 만드는 이메일 관련 정보를 포함하는 JSON 객체입니다.  | 
|  `bounce`  |  이 필드는 `eventType`이 `Bounce`인 경우에만 존재합니다. 이 파일에는 반송 관련 정보가 포함되어 있습니다.  | 
|  `complaint`  |  이 필드는 `eventType`이 `Complaint`인 경우에만 존재합니다. 이 파일에는 수신 거부 관련 정보가 포함되어 있습니다.  | 
|  `delivery`  |  이 필드는 `eventType`이 `Delivery`인 경우에만 존재합니다. 이 파일에는 전송 관련 정보가 포함되어 있습니다.  | 
|  `send`  |  이 필드는 `eventType`이 `Send`인 경우에만 존재합니다.  | 
|  `reject`  |  이 필드는 `eventType`이 `Reject`인 경우에만 존재합니다. 이 파일에는 거부 관련 정보가 포함되어 있습니다.  | 
|  `open`  |  이 필드는 `eventType`이 `Open`인 경우에만 존재합니다. 이 파일에는 열기 이벤트 관련 정보가 포함되어 있습니다.  | 
|  `click`  |  이 필드는 `eventType`이 `Click`인 경우에만 존재합니다. 이 파일에는 클릭 이벤트 관련 정보가 포함되어 있습니다.  | 
| `failure` | 이 필드는 `eventType`이 `Rendering Failure`인 경우에만 존재합니다. 이 파일에는 렌더링 오류 이벤트 관련 정보가 포함되어 있습니다. | 
|  `deliveryDelay`  |  이 필드는 `eventType`이 `DeliveryDelay`인 경우에만 존재합니다. 이메일 전송 지연에 대한 정보가 포함되어 있습니다.  | 
|  `subscription`  |  이 필드는 `eventType`이 `Subscription`인 경우에만 존재합니다. 여기에는 구독 기본 설정에 대한 정보가 포함되어 있습니다.  | 

## Mail 객체
<a name="event-publishing-retrieving-sns-contents-mail-object"></a>

각 이메일 전송 이벤트 레코드는 `mail` 객체에 원래 메일에 대한 정보를 포함하고 있습니다. `mail` 객체 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `timestamp`  |  메시지가 전송된 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `messageId`  |  Amazon SES가 메시지에 할당한 고유 ID입니다. 메시지를 보낼 때 Amazon SES에서 이 값을 반환했습니다.  이 메시지 ID는 Amazon SES에서 할당한 것입니다. `mail` 객체의 `headers` 및 `commonHeaders` 필드에서 원래 메시지의 메시지 ID를 찾을 수 있습니다.   | 
|  `source`  |  메시지를 전송한 이메일 주소(엔벌로프 MAIL FROM 주소).  | 
|  `sourceArn`  |  이메일을 전송하는 데 사용된 ID의 Amazon 리소스 이름(ARN). 권한 부여 전송의 경우 `sourceArn`은 ID 소유자가 위임 발신자에게 메일 전송 시 사용하도록 권한을 부여한 ID의 ARN입니다. 권한 부여 전송에 대한 자세한 내용은 [이메일 인증 방법전송 권한 부여 사용](sending-authorization.md) 섹션을 참조하세요.  | 
|  `sendingAccountId`  |  이메일을 보내는 데 사용된 AWS 계정의 계정 ID입니다. 권한 부여 전송의 경우 `sendingAccountId`는 위임 발신자의 계정 ID입니다.  | 
|  `destination`  |  원래 메일의 수신자인 이메일 주소의 목록.  | 
|  `headersTruncated`  |  알림에서 헤더가 잘렸는지 여부를 나타내는 문자열입니다. 헤더의 용량이 10KB를 초과할 경우 헤더가 잘립니다. 가능한 값은 `true` 및 `false`입니다.  | 
|  `headers`  |  이메일의 원래 헤더 목록입니다. 목록의 각 헤더에는 `name` 필드와 `value` 필드가 존재합니다.  `headers` 필드의 모든 메시지 ID는 Amazon SES에 전달한 원본 메시지에서 가져온 것입니다. 이어서 Amazon SES가 메시지에 할당한 메시지 ID는 `mail` 객체의 `messageId` 필드에 들어 있습니다.   | 
|  `commonHeaders`  |  자주 사용되는 원래 이메일 헤더의 매핑입니다.  `commonHeaders` 필드의 모든 메시지 ID는 Amazon SES가 `mail` 객체의 `messageId` 필드 내 메시지에 할당한 메시지 ID입니다.   | 
|  `tags`  |  이메일과 연결된 태그 목록입니다.  | 

## Bounce 객체
<a name="event-publishing-retrieving-sns-contents-bounce-object"></a>

`Bounce` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `bounceType`  |  Amazon SES가 결정한 반송 메일의 유형.  | 
|  `bounceSubType`  |  Amazon SES가 결정한 반송 메일의 하위 유형.  | 
|  `bouncedRecipients`  |  반송된 원래 메일의 수신자 정보를 포함하는 목록.  | 
|  `timestamp`  |  ISP가 반송 메일 알림을 전송한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `feedbackId`  |  반송 메일의 고유 ID.  | 
|  `reportingMTA`  |  DSN의 `Reporting-MTA` 필드의 값. DSN에서 설명하는 전송, 중계 또는 게이트웨이 작업을 시도하는 메시지 전송 권한(MTA)의 값입니다.  이 필드는 반송 메일에 전송 상태 알림(DSN)이 첨부된 경우에만 표시됩니다.   | 

### 반송 수신자
<a name="event-publishing-retrieving-sns-contents-bounced-recipients"></a>

반송 이벤트는 단일 수신자 또는 여러 수신자와 관련이 있을 수 있습니다. `bouncedRecipients` 필드는 객체(이메일 주소가 반송 메일을 생성한 수신자당 객체 1개)의 목록을 포함하고 있으며 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `emailAddress`  |  수신자의 이메일 주소. DSN이 사용 가능할 경우, DSN의 `Final-Recipient` 필드의 값입니다.  | 

또는 반송 메일에 DSN이 첨부된 경우 다음 필드도 존재할 수 있습니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `action`  |  DSN의 `Action` 필드의 값. 이 수신자에게 메시지를 전송하려는 시도의 결과로 보고-MTA가 수행하는 작업을 나타냅니다.  | 
|  `status`  |  DSN의 `Status` 필드의 값. 메시지의 전송 상태를 나타내는 수신자별 전송 독립적 상태 코드입니다.  | 
|  `diagnosticCode`  |  보고-MTA가 발행한 상태 코드. DSN의 `Diagnostic-Code` 필드의 값입니다. 이 필드가 DSN에는 없을 수 있습니다(따라서 JSON에도 없음).  | 

### 반송 메일 유형
<a name="event-publishing-retrieving-sns-contents-bounce-types"></a>

각 반송 메일 이벤트는 다음 표에 나와 있는 유형 중 하나가 됩니다.

이벤트 게시 시스템은 Amazon SES에서 더 이상 재시도하지 않을 하드 바운스 및 소프트 바운스만 게시합니다. `Permanent`로 표시된 반송 메일을 받으면 메일 그룹에서 해당 이메일 주소를 삭제해야 하며 다음부터는 그러한 이메일 주소로 전송할 수 없습니다. `Transient` 반송 메일은 메시지가 여러 번 소프트 바운스되어 Amazon SES에서 이러한 메일에 대해 재전송 시도를 중지한 경우에 전송됩니다. 처음에 `Transient` 반송 메일이 발생한 주소로 이후 전송 재시도가 성공할 수도 있습니다.


| bounceType | bounceSubType | 설명 | 
| --- | --- | --- | 
|  `Undetermined`  |  `Undetermined`  |  Amazon SES가 특정 반송 사유를 결정하지 못했습니다.  | 
|  `Permanent`  |  `General`  |  Amazon SES가 일반 하드 바운스를 수신했습니다. 이 유형의 반송 메일을 받은 경우, 이 수신자의 이메일 주소를 메일 발송 목록에서 삭제해야 합니다.  | 
|  `Permanent`  |  `NoEmail`  |  대상 이메일 주소가 존재하지 않아 Amazon SES가 영구 하드 바운스를 수신했습니다. 이 유형의 반송 메일을 받은 경우, 이 수신자의 이메일 주소를 메일 발송 목록에서 삭제해야 합니다.  | 
|  `Permanent`  |  `Suppressed`  |  최근의 잘못된 주소로 인한 반송 이력 때문에 Amazon SES가 이 주소로 메일 전송을 금지했습니다. 전역 금지 목록을 재정의하려면 [Amazon SES 계정 수준 금지 목록 사용](sending-email-suppression-list.md) 섹션을 참조하세요.  | 
| Permanent | OnAccountSuppressionList | [계정 수준 금지 목록](sending-email-suppression-list.md)에 있으므로 Amazon SES가 이 주소로 보내는 것을 금지했습니다. 이는 반송 비율 지표에 반영되지 않습니다. | 
|  `Transient`  |  `General`  |  Amazon SES가 일반 반송 메일을 수신했습니다. 이후에 이 수신자에게 전송이 성공할 수도 있습니다.  | 
|  `Transient`  |  `MailboxFull`  |  Amazon SES가 메일박스 가득 참 반송 메일을 수신했습니다. 이후에 이 수신자에게 전송이 성공할 수도 있습니다.  | 
|  `Transient`  |  `MessageTooLarge`  |  Amazon SES가 메시지 너무 큼 반송 메일을 수신했습니다. 메시지 크기를 줄일 경우 이 수신자에게 전송이 성공할 수도 있습니다.  | 
|  `Transient`  |  `CustomTimeoutExceeded`  |  Amazon SES가 이메일 발신자가 지정한 시간 내에 이메일을 성공적으로 전송하지 못했습니다. *(반송 메시지는 정의된 TTL 내에서 가능한 전송 시도 실패의 이유를 지정합니다.)*   | 
|  `Transient`  |  `ContentRejected`  |  Amazon SES가 내용 거부 반송 메일을 수신했습니다. 메시지 내용을 변경할 경우 이 수신자에게 전송이 성공할 수도 있습니다.  | 
|  `Transient`  |  `AttachmentRejected`  |  Amazon SES가 첨부 파일 거부 반송 메일을 수신했습니다. 첨부 파일을 제거하거나 변경할 경우 이 수신자에게 전송이 성공할 수도 있습니다.  | 

## Complaint 객체
<a name="event-publishing-retrieving-sns-contents-complaint-object"></a>

`Complaint` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `complainedRecipients`  |  수신 거부를 제출했을 수 있는 수신자에 대한 정보를 포함하는 목록.  | 
|  `timestamp`  |  ISP가 수신 거부 알림을 전송한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `feedbackId`  |  수신 거부의 고유 ID.  | 
|  `complaintSubType`  |  Amazon SES가 결정한 수신 거부의 하위 유형.  | 

또한, 수신 거부에 피드백 보고서가 첨부된 경우 다음 필드가 포함될 수 있습니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `userAgent`  |  피드백 보고서의 `User-Agent` 필드의 값입니다. 보고서를 생성한 시스템의 이름 및 버전을 나타냅니다.  | 
|  `complaintFeedbackType`  |  ISP로부터 수신된 피드백 보고서의 `Feedback-Type` 필드의 값. 이 값은 피드백의 유형을 포함합니다.  | 
|  `arrivalDate`  |  피드백 보고서의 `Arrival-Date` 또는 `Received-Date` 필드 값으로 ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)입니다. 이 필드가 보고서에는 없을 수 있습니다(따라서 JSON에도 없음).  | 

### 수신 거부한 수신자
<a name="event-publishing-retrieving-sns-contents-complained-recipients"></a>

`complainedRecipients` 필드는 수신 거부를 제출했을 수 있는 수신자의 목록을 포함합니다.

**중요**  
대부분 ISP는 수신 거부를 제출한 수신자의 이메일 주소를 수정합니다. 이러한 이유로 `complainedRecipients` 필드에는 수신 거부 알림을 발행한 도메인의 주소로 이메일이 전송된 모든 사람의 목록이 있습니다.

이 목록의 JSON 객체는 다음 필드를 포함합니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `emailAddress`  |  수신자의 이메일 주소.  | 

### 수신 거부 유형
<a name="event-publishing-retrieving-sns-contents-complaint-types"></a>

[Internet Assigned Numbers Authority 웹사이트](https://www.iana.org/assignments/marf-parameters/marf-parameters.xml#marf-parameters-2):에 따라 `complaintFeedbackType` 필드에 보고 ISP가 할당한 다음과 같은 수신 거부 유형이 나타날 수 있습니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `abuse`  |  원치 않는 이메일 또는 기타 유형의 이메일 침해를 나타냅니다.  | 
|  `auth-failure`  |  이메일 인증 실패 보고서.  | 
|  `fraud`  |  일종의 사기 또는 피싱 활동을 나타냅니다.  | 
|  `not-spam`  |  보고서를 제공하는 엔터티가 메시지를 스팸으로 간주하지 않음을 나타냅니다. 이는 스팸으로 잘못 태그 지정 또는 분류된 메시지를 교정하기 위해 사용될 수 있습니다.  | 
|  `other`  |  다른 등록된 유형에 들어맞지 않는 기타 피드백을 나타냅니다.  | 
|  `virus`  |  발원 메시지에서 바이러스가 발견되었다는 보고서.  | 

### 수신 거부 하위 유형
<a name="event-publishing-retrieving-sns-contents-complaint-subtypes"></a>

`complaintSubType` 필드의 값은 null 또는 `OnAccountSuppressionList`일 수 있습니다. 값이 `OnAccountSuppressionList`인 경우 Amazon SES는 메시지를 수락했지만 [계정 수준 금지 목록](sending-email-suppression-list.md)에 있었기 때문에 메시지를 보내려고 시도하지 않았습니다.

## 전송 객체
<a name="event-publishing-retrieving-sns-contents-delivery-object"></a>

`Delivery` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `timestamp`  |  Amazon SES가 수신자의 메일 서버로 이메일을 전송한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `processingTimeMillis`  |  Amazon SES가 발신자로부터 요청을 수락한 때로부터 Amazon SES가 수신자의 메일 서버로 메시지를 전송한 때까지의 시간(단위: 밀리초).  | 
|  `recipients`  |  전송 이벤트가 적용되는 의도한 수신자의 목록.  | 
|  `smtpResponse`  |  Amazon SES로부터 이메일을 수락한 원격 ISP의 SMTP 응답 메시지. 이 메시지는 이메일, 수신 메일 서버, 수신 ISP마다 다릅니다.  | 
|  `reportingMTA`  |  메일을 전송한 Amazon SES 메일 서버의 호스트 이름.  | 
|  `remoteMtaIp`  |  Amazon SES에서 이메일을 전송한 MTA의 IP 주소입니다.  | 

## Send 객체
<a name="event-publishing-retrieving-sns-contents-send-object"></a>

`send` 이벤트 정보를 포함하는 JSON 객체는 항상 비어 있습니다.

## Reject 객체
<a name="event-publishing-retrieving-sns-contents-reject-object"></a>

`Reject` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `reason`  |  이메일이 거부된 이유입니다. 유일하게 가능한 값은 `Bad content`로, Amazon SES가 바이러스 포함 이메일을 감지했다는 뜻입니다. 메시지가 거부되면 Amazon SES는 메시지 처리를 중지하고 해당 메시지를 수신자의 메일 서버로 전송하지 않습니다.  | 

## Open 객체
<a name="event-publishing-retrieving-sns-contents-open-object"></a>

`Open` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `ipAddress`  |  수신자의 IP 주소입니다.  | 
|  `timestamp`  |  열기 이벤트가 발생한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `userAgent`  |  수신자가 이메일을 여는 데 사용한 이메일 클라이언트 또는 디바이스의 사용자 에이전트입니다.  | 

## Click 객체
<a name="event-publishing-retrieving-sns-contents-click-object"></a>

`Click` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `ipAddress`  |  수신자의 IP 주소입니다.  | 
|  `timestamp`  |  클릭 이벤트가 발생한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `userAgent`  |  수신자가 이메일의 링크를 클릭하는 데 사용한 클라이언트의 사용자 에이전트입니다.  | 
|  `link`  |  수신자가 클릭한 링크의 URL입니다.  | 
|  `linkTags`  |  `ses:tags` 속성을 사용하여 링크에 추가된 태그 목록입니다. 이메일의 링크에 태그를 추가하는 방법은 [Q5. 링크에 고유 식별자로 태그를 지정할 수 있습니까?](faqs-metrics.md#sending-metric-faqs-clicks-q5)의 [Amazon SES 이메일 전송 지표 FAQ](faqs-metrics.md) 섹션을 참조하세요.  | 

## Rendering Failure 객체
<a name="event-publishing-retrieving-sns-contents-failure-object"></a>

`Rendering Failure` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `templateName`  |  이메일을 전송하는 데 사용하는 템플릿의 이름입니다.  | 
|  `errorMessage`  |  렌더링 오류에 관한 자세한 정보를 제공하는 메시지입니다.  | 

## DeliveryDelay 객체
<a name="event-publishing-retrieving-sns-contents-delivery-delay-object"></a>

`DeliveryDelay` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `delayType`  |  지연 유형입니다. 가능한 값은 다음과 같습니다. [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/ses/latest/dg/event-publishing-retrieving-sns-contents.html)  | 
|  `delayedRecipients`  |  이메일 수신자에 대한 정보가 있는 객체입니다.  | 
|  `expirationTime`  |  Amazon SES에서 메시지 전송 시도를 중지할 날짜 및 시간입니다. 이 값은 ISO 8601 형식으로 표시됩니다.  | 
|  `reportingMTA`  |  지연을 보고한 MTA(메시지 전송 에이전트) 의 IP 주소입니다.  | 
|  `timestamp`  |  지연이 발생한 날짜 및 시간으로 ISO 8601 형식으로 표시됩니다.  | 

### 지연된 수신자
<a name="event-publishing-retrieving-sns-contents-delivery-delay-object-recipients"></a>

`delayedRecipients` 객체는 다음 값을 포함합니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `emailAddress`  |  메시지 전송이 지연된 이메일 주소입니다.  | 
|  `status`  |  전송 지연 관련된 SMTP 상태 코드입니다.  | 
|  `diagnosticCode`  |  수신 메시지 전송 에이전트(MTA)에서 제공하는 진단 코드입니다.  | 

## 구독 객체
<a name="event-publishing-retrieving-sns-contents-subscription-object"></a>

`Subscription` 이벤트 정보를 포함하는 JSON 객체는 다음 필드로 구성됩니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `contactList`  |  연락처가 있는 목록의 이름입니다.  | 
|  `timestamp`  |  ISP가 구독 알림을 전송한 날짜와 시간으로, ISO8601 형식(*YYYY-MM-DDThh:mm:ss.sZ*)으로 표시됩니다.  | 
|  `source`  |  메시지를 전송한 이메일 주소(엔벌로프 MAIL FROM 주소).  | 
|  `newTopicPreferences`  |  연락처 목록에 있는 모든 주제의 구독 상태를 지정하는 JSON 데이터 구조(맵)로, 변경 후 상태를 나타냅니다(연락처 구독함 또는 구독 취소함).  | 
|  `oldTopicPreferences`  |  연락처 목록에 있는 모든 주제의 구독 상태를 지정하는 JSON 데이터 구조(맵)로, 변경 전 상태를 나타냅니다(연락처 구독함 또는 구독 취소함).  | 

### 신규/이전 주제 기본 설정
<a name="event-publishing-retrieving-sns-contents-subscription-object-topic-preferences"></a>

`newTopicPreferences` 및 `oldTopicPreferences` 객체는 다음 값을 포함합니다.


| 필드 이름 | 설명 | 
| --- | --- | 
|  `unsubscribeAll`  |  연락처 목록의 모든 주제에서 연락처가 구독을 취소했는지를 지정합니다.  | 
|  `topicSubscriptionStatus`  |  지정된 이벤트 유형에 대해 현재 SES로부터 알림을 수신하도록 구독하고 있는지를 나타내는 `topicName` 필드에서 주제의 구독 상태를 지정합니다. `subscriptionStatus` 필드에서 사용 가능한 값은 **OptIn**(구독) 또는 **OptOut**(구독 취소)입니다.  | 
|  `topicDefaultSubscriptionStatus`  |  `topicName` 필드에서 주제의 기본 구독 상태를 지정하여 이벤트 대상에 추가된 새 주제를 기본적으로 구독할지 아니면 구독 취소할지 결정합니다. `subscriptionStatus` 필드에서 사용 가능한 값은 **OptIn**(기본적으로 구독) 또는 **OptOut**(기본적으로 구독 취소)입니다.  | 

# Amazon SES가 Amazon SNS에 게시하는 이벤트 데이터 예제
<a name="event-publishing-retrieving-sns-examples"></a>

이 섹션에서는 Amazon SES가 Amazon SNS에 게시하는 이메일 전송 이벤트 레코드의 유형별 예제를 제공합니다.

**Topics**
+ [Bounce 레코드](#event-publishing-retrieving-sns-bounce)
+ [Complaint 레코드](#event-publishing-retrieving-sns-complaint)
+ [Delivery 레코드](#event-publishing-retrieving-sns-delivery)
+ [Send 레코드](#event-publishing-retrieving-sns-send)
+ [Reject 레코드](#event-publishing-retrieving-sns-reject)
+ [Open 레코드](#event-publishing-retrieving-sns-open)
+ [Click 레코드](#event-publishing-retrieving-sns-click)
+ [Rendering Failure 레코드](#event-publishing-retrieving-sns-failure)
+ [DeliveryDelay 레코드](#event-publishing-retrieving-sns-delayed-delivery)
+ [구독 레코드](#event-publishing-retrieving-sns-subscription)

**참고**  
다음 예제에서는 `tag` 필드가 사용되며, SES가 모든 이벤트 유형에 대한 태그 게시를 지원하는 구성 집합을 통해 이벤트 게시를 사용하고 있습니다. ID에 직접 피드백 알림을 사용하는 경우 SES는 태그를 게시하지 않습니다. [구성 세트 생성](creating-configuration-sets.md) 또는 [구성 세트 수정](managing-configuration-sets.md#console-detail-configuration-sets) 작업을 할 때 태그 추가하기에 대해 읽어보세요.

## Bounce 레코드
<a name="event-publishing-retrieving-sns-bounce"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `Bounce` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType":"Bounce",
 3.   "bounce":{
 4.     "bounceType":"Permanent",
 5.     "bounceSubType":"General",
 6.     "bouncedRecipients":[
 7.       {
 8.         "emailAddress":"recipient@example.com",
 9.         "action":"failed",
10.         "status":"5.1.1",
11.         "diagnosticCode":"smtp; 550 5.1.1 user unknown"
12.       }
13.     ],
14.     "timestamp":"2017-08-05T00:41:02.669Z",
15.     "feedbackId":"01000157c44f053b-61b59c11-9236-11e6-8f96-7be8aexample-000000",
16.     "reportingMTA":"dsn; mta.example.com"
17.   },
18.   "mail":{
19.     "timestamp":"2017-08-05T00:40:02.012Z",
20.     "source":"Sender Name <sender@example.com>",
21.     "sourceArn":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
22.     "sendingAccountId":"123456789012",
23.     "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
24.     "destination":[
25.       "recipient@example.com"
26.     ],
27.     "headersTruncated":false,
28.     "headers":[
29.       {
30.         "name":"From",
31.         "value":"Sender Name <sender@example.com>"
32.       },
33.       {
34.         "name":"To",
35.         "value":"recipient@example.com"
36.       },
37.       {
38.         "name":"Subject",
39.         "value":"Message sent from Amazon SES"
40.       },
41.       {
42.         "name":"MIME-Version",
43.         "value":"1.0"
44.       },
45.       {
46.         "name":"Content-Type",
47.         "value":"multipart/alternative; boundary=\"----=_Part_7307378_1629847660.1516840721503\""
48.       }
49.     ],
50.     "commonHeaders":{
51.       "from":[
52.         "Sender Name <sender@example.com>"
53.       ],
54.       "to":[
55.         "recipient@example.com"
56.       ],
57.       "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
58.       "subject":"Message sent from Amazon SES"
59.     },
60.     "tags":{
61.       "ses:configuration-set":[
62.         "ConfigSet"
63.       ],
64.       "ses:source-ip":[
65.         "192.0.2.0"
66.       ],
67.       "ses:from-domain":[
68.         "example.com"
69.       ],
70.       "ses:caller-identity":[
71.         "ses_user"
72.       ]
73.     }
74.   }
75. }
```

## Complaint 레코드
<a name="event-publishing-retrieving-sns-complaint"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `Complaint` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType":"Complaint",
 3.   "complaint": {
 4.     "complainedRecipients":[
 5.       {
 6.         "emailAddress":"recipient@example.com"
 7.       }
 8.     ],
 9.     "timestamp":"2017-08-05T00:41:02.669Z",
10.     "feedbackId":"01000157c44f053b-61b59c11-9236-11e6-8f96-7be8aexample-000000",
11.     "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36",
12.     "complaintFeedbackType":"abuse",
13.     "arrivalDate":"2017-08-05T00:41:02.669Z"
14.   },
15.   "mail":{
16.     "timestamp":"2017-08-05T00:40:01.123Z",
17.     "source":"Sender Name <sender@example.com>",
18.     "sourceArn":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
19.     "sendingAccountId":"123456789012",
20.     "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
21.     "destination":[
22.       "recipient@example.com"
23.     ],
24.     "headersTruncated":false,
25.     "headers":[
26.       {
27.         "name":"From",
28.         "value":"Sender Name <sender@example.com>"
29.       },
30.       {
31.         "name":"To",
32.         "value":"recipient@example.com"
33.       },
34.       {
35.         "name":"Subject",
36.         "value":"Message sent from Amazon SES"
37.       },
38.       {
39.         "name":"MIME-Version","value":"1.0"
40.       },
41.       {
42.         "name":"Content-Type",
43.         "value":"multipart/alternative; boundary=\"----=_Part_7298998_679725522.1516840859643\""
44.       }
45.     ],
46.     "commonHeaders":{
47.       "from":[
48.         "Sender Name <sender@example.com>"
49.       ],
50.       "to":[
51.         "recipient@example.com"
52.       ],
53.       "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
54.       "subject":"Message sent from Amazon SES"
55.     },
56.     "tags":{
57.       "ses:configuration-set":[
58.         "ConfigSet"
59.       ],
60.       "ses:source-ip":[
61.         "192.0.2.0"
62.       ],
63.       "ses:from-domain":[
64.         "example.com"
65.       ],
66.       "ses:caller-identity":[
67.         "ses_user"
68.       ]
69.     }
70.   }
71. }
```

## Delivery 레코드
<a name="event-publishing-retrieving-sns-delivery"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `Delivery` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Delivery",
 3.   "mail": {
 4.     "timestamp": "2016-10-19T23:20:52.240Z",
 5.     "source": "sender@example.com",
 6.     "sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId": "123456789012",
 8.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination": [
10.       "recipient@example.com"
11.     ],
12.     "headersTruncated": false,
13.     "headers": [
14.       {
15.         "name": "From",
16.         "value": "sender@example.com"
17.       },
18.       {
19.         "name": "To",
20.         "value": "recipient@example.com"
21.       },
22.       {
23.         "name": "Subject",
24.         "value": "Message sent from Amazon SES"
25.       },
26.       {
27.         "name": "MIME-Version",
28.         "value": "1.0"
29.       },
30.       {
31.         "name": "Content-Type",
32.         "value": "text/html; charset=UTF-8"
33.       },
34.       {
35.         "name": "Content-Transfer-Encoding",
36.         "value": "7bit"
37.       }
38.     ],
39.     "commonHeaders": {
40.       "from": [
41.         "sender@example.com"
42.       ],
43.       "to": [
44.         "recipient@example.com"
45.       ],
46.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
47.       "subject": "Message sent from Amazon SES"
48.     },
49.     "tags": {
50.       "ses:configuration-set": [
51.         "ConfigSet"
52.       ],
53.       "ses:source-ip": [
54.         "192.0.2.0"
55.       ],
56.       "ses:from-domain": [
57.         "example.com"
58.       ],
59.       "ses:caller-identity": [
60.         "ses_user"
61.       ],
62.       "ses:outgoing-ip": [
63.         "192.0.2.0"
64.       ],
65.       "myCustomTag1": [
66.         "myCustomTagValue1"
67.       ],
68.       "myCustomTag2": [
69.         "myCustomTagValue2"
70.       ]      
71.     }
72.   },
73.   "delivery": {
74.     "timestamp": "2016-10-19T23:21:04.133Z",
75.     "processingTimeMillis": 11893,
76.     "recipients": [
77.       "recipient@example.com"
78.     ],
79.     "smtpResponse": "250 2.6.0 Message received",
80.     "remoteMtaIp": "123.456.789.012",
81.     "reportingMTA": "mta.example.com"
82.   }
83. }
```

## Send 레코드
<a name="event-publishing-retrieving-sns-send"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `Send` 이벤트 레코드의 예제입니다. 일부 필드는 표시되지 않을 수도 있습니다. 예를 들어 템플릿으로 작성된 이메일을 사용하면 제목이 나중에 렌더링되고 후속 이벤트에 포함됩니다.

```
 1. {
 2.   "eventType": "Send",
 3.   "mail": {
 4.     "timestamp": "2016-10-14T05:02:16.645Z",
 5.     "source": "sender@example.com",
 6.     "sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId": "123456789012",
 8.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination": [
10.       "recipient@example.com"
11.     ],
12.     "headersTruncated": false,
13.     "headers": [
14.       {
15.         "name": "From",
16.         "value": "sender@example.com"
17.       },
18.       {
19.         "name": "To",
20.         "value": "recipient@example.com"
21.       },
22.       {
23.         "name": "Subject",
24.         "value": "Message sent from Amazon SES"
25.       },
26.       {
27.         "name": "MIME-Version",
28.         "value": "1.0"
29.       },
30.       {
31.         "name": "Content-Type",
32.         "value": "multipart/mixed;  boundary=\"----=_Part_0_716996660.1476421336341\""
33.       },
34.       {
35.         "name": "X-SES-MESSAGE-TAGS",
36.         "value": "myCustomTag1=myCustomTagValue1, myCustomTag2=myCustomTagValue2"
37.       }
38.     ],
39.     "commonHeaders": {
40.       "from": [
41.         "sender@example.com"
42.       ],
43.       "to": [
44.         "recipient@example.com"
45.       ],
46.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
47.       "subject": "Message sent from Amazon SES"
48.     },
49.     "tags": {
50.       "ses:configuration-set": [
51.         "ConfigSet"
52.       ],
53.       "ses:source-ip": [
54.         "192.0.2.0"
55.       ],
56.       "ses:from-domain": [
57.         "example.com"
58.       ],      
59.       "ses:caller-identity": [
60.         "ses_user"
61.       ],
62.       "myCustomTag1": [
63.         "myCustomTagValue1"
64.       ],
65.       "myCustomTag2": [
66.         "myCustomTagValue2"
67.       ]      
68.     }
69.   },
70.   "send": {}
71. }
```

## Reject 레코드
<a name="event-publishing-retrieving-sns-reject"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `Reject` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Reject",
 3.   "mail": {
 4.     "timestamp": "2016-10-14T17:38:15.211Z",
 5.     "source": "sender@example.com",
 6.     "sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId": "123456789012",
 8.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination": [
10.       "sender@example.com"
11.     ],
12.     "headersTruncated": false,
13.     "headers": [
14.       {
15.         "name": "From",
16.         "value": "sender@example.com"
17.       },
18.       {
19.         "name": "To",
20.         "value": "recipient@example.com"
21.       },      
22.       {
23.         "name": "Subject",
24.         "value": "Message sent from Amazon SES"
25.       },
26.       {
27.         "name": "MIME-Version",
28.         "value": "1.0"
29.       },      
30.       {
31.         "name": "Content-Type",
32.         "value": "multipart/mixed; boundary=\"qMm9M+Fa2AknHoGS\""
33.       },
34.       {
35.         "name": "X-SES-MESSAGE-TAGS",
36.         "value": "myCustomTag1=myCustomTagValue1, myCustomTag2=myCustomTagValue2"
37.       }  
38.     ],
39.     "commonHeaders": {
40.       "from": [
41.         "sender@example.com"
42.       ],
43.       "to": [
44.         "recipient@example.com"
45.       ],
46.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
47.       "subject": "Message sent from Amazon SES"
48.     },
49.     "tags": {
50.       "ses:configuration-set": [
51.         "ConfigSet"
52.       ],
53.       "ses:source-ip": [
54.         "192.0.2.0"
55.       ],
56.       "ses:from-domain": [
57.         "example.com"
58.       ],    
59.       "ses:caller-identity": [
60.         "ses_user"
61.       ],
62.       "myCustomTag1": [
63.         "myCustomTagValue1"
64.       ],
65.       "myCustomTag2": [
66.         "myCustomTagValue2"
67.       ]      
68.     }
69.   },
70.   "reject": {
71.     "reason": "Bad content"
72.   }
73. }
```

## Open 레코드
<a name="event-publishing-retrieving-sns-open"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `Open` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Open",
 3.   "mail": {
 4.     "commonHeaders": {
 5.       "from": [
 6.         "sender@example.com"
 7.       ],
 8.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.       "subject": "Message sent from Amazon SES",
10.       "to": [
11.         "recipient@example.com"
12.       ]
13.     },
14.     "destination": [
15.       "recipient@example.com"
16.     ],
17.     "headers": [
18.       {
19.         "name": "X-SES-CONFIGURATION-SET",
20.         "value": "ConfigSet"
21.       },
22.       {
23.         "name":"X-SES-MESSAGE-TAGS",
24.         "value":"myCustomTag1=myCustomValue1, myCustomTag2=myCustomValue2"
25.       },
26.       {
27.         "name": "From",
28.         "value": "sender@example.com"
29.       },
30.       {
31.         "name": "To",
32.         "value": "recipient@example.com"
33.       },
34.       {
35.         "name": "Subject",
36.         "value": "Message sent from Amazon SES"
37.       },
38.       {
39.         "name": "MIME-Version",
40.         "value": "1.0"
41.       },
42.       {
43.         "name": "Content-Type",
44.         "value": "multipart/alternative; boundary=\"XBoundary\""
45.       }
46.     ],
47.     "headersTruncated": false,
48.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
49.     "sendingAccountId": "123456789012",
50.     "source": "sender@example.com",
51.     "tags": {
52.       "myCustomTag1":[
53.         "myCustomValue1"
54.       ],
55.       "myCustomTag2":[
56.         "myCustomValue2"
57.       ],
58.       "ses:caller-identity": [
59.         "IAM_user_or_role_name"
60.       ],
61.       "ses:configuration-set": [
62.         "ConfigSet"
63.       ],
64.       "ses:from-domain": [
65.         "example.com"
66.       ],
67.       "ses:source-ip": [
68.         "192.0.2.0"
69.       ]
70.     },
71.     "timestamp": "2017-08-09T21:59:49.927Z"
72.   },
73.   "open": {
74.     "ipAddress": "192.0.2.1",
75.     "timestamp": "2017-08-09T22:00:19.652Z",
76.     "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60"
77.   }
78. }
```

## Click 레코드
<a name="event-publishing-retrieving-sns-click"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `Click` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Click",
 3.   "click": {
 4.     "ipAddress": "192.0.2.1",
 5.     "link": "http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp.html",
 6.     "linkTags": {
 7.       "samplekey0": [
 8.         "samplevalue0"
 9.       ],
10.       "samplekey1": [
11.         "samplevalue1"
12.       ]
13.     },
14.     "timestamp": "2017-08-09T23:51:25.570Z",
15.     "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"
16.   },
17.   "mail": {
18.     "commonHeaders": {
19.       "from": [
20.         "sender@example.com"
21.       ],
22.       "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
23.       "subject": "Message sent from Amazon SES",
24.       "to": [
25.         "recipient@example.com"
26.       ]
27.     },
28.     "destination": [
29.       "recipient@example.com"
30.     ],
31.     "headers": [
32.       {
33.         "name": "X-SES-CONFIGURATION-SET",
34.         "value": "ConfigSet"
35.       },
36.       {
37.         "name":"X-SES-MESSAGE-TAGS",
38.         "value":"myCustomTag1=myCustomValue1, myCustomTag2=myCustomValue2"
39.       },
40.       {
41.         "name": "From",
42.         "value": "sender@example.com"
43.       },
44.       {
45.         "name": "To",
46.         "value": "recipient@example.com"
47.       },
48.       {
49.         "name": "Subject",
50.         "value": "Message sent from Amazon SES"
51.       },
52.       {
53.         "name": "MIME-Version",
54.         "value": "1.0"
55.       },
56.       {
57.         "name": "Content-Type",
58.         "value": "multipart/alternative; boundary=\"XBoundary\""
59.       },
60.       {
61.         "name": "Message-ID",
62.         "value": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000"
63.       }
64.     ],
65.     "headersTruncated": false,
66.     "messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
67.     "sendingAccountId": "123456789012",
68.     "source": "sender@example.com",
69.     "tags": {
70.       "myCustomTag1":[
71.         "myCustomValue1"
72.       ],
73.       "myCustomTag2":[
74.         "myCustomValue2"
75.       ],
76.       "ses:caller-identity": [
77.         "ses_user"
78.       ],
79.       "ses:configuration-set": [
80.         "ConfigSet"
81.       ],
82.       "ses:from-domain": [
83.         "example.com"
84.       ],
85.       "ses:source-ip": [
86.         "192.0.2.0"
87.       ]
88.     },
89.     "timestamp": "2017-08-09T23:50:05.795Z"
90.   }
91. }
```

## Rendering Failure 레코드
<a name="event-publishing-retrieving-sns-failure"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `Rendering Failure` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType":"Rendering Failure",
 3.   "mail":{
 4.     "timestamp":"2018-01-22T18:43:06.197Z",
 5.     "source":"sender@example.com",
 6.     "sourceArn":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId":"123456789012",
 8.     "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination":[
10.       "recipient@example.com"
11.     ],
12.     "headersTruncated":false,
13.     "tags":{
14.       "ses:configuration-set":[
15.         "ConfigSet"
16.       ]
17.     }
18.   },
19.   "failure":{
20.     "errorMessage":"Attribute 'attributeName' is not present in the rendering data.",
21.     "templateName":"MyTemplate"
22.   }
23. }
```

## DeliveryDelay 레코드
<a name="event-publishing-retrieving-sns-delayed-delivery"></a>

다음은 Amazon SES가 Amazon SNS에 게시하는 `DeliveryDelay` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "DeliveryDelay",
 3.   "mail":{
 4.     "timestamp":"2020-06-16T00:15:40.641Z",
 5.     "source":"sender@example.com",
 6.     "sourceArn":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId":"123456789012",
 8.     "messageId":"EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",
 9.     "destination":[
10.       "recipient@example.com"
11.     ],
12.     "headersTruncated":false,
13.     "tags":{
14.       "ses:configuration-set":[
15.         "ConfigSet"
16.       ]
17.     }
18.   },
19.   "deliveryDelay": {
20.     "timestamp": "2020-06-16T00:25:40.095Z",
21.     "delayType": "TransientCommunicationFailure",
22.     "expirationTime": "2020-06-16T00:25:40.914Z",
23.     "delayedRecipients": [{
24.       "emailAddress": "recipient@example.com",
25.       "status": "4.4.1",
26.       "diagnosticCode": "smtp; 421 4.4.1 Unable to connect to remote host"
27.     }]
28.   }
29. }
```

## 구독 레코드
<a name="event-publishing-retrieving-sns-subscription"></a>

다음은 Amazon SES가 Firehose에 게시하는 `Subscription` 이벤트 레코드의 예제입니다.

```
 1. {
 2.   "eventType": "Subscription",
 3.   "mail": {
 4.     "timestamp": "2022-01-12T01:00:14.340Z",
 5.     "source": "sender@example.com",
 6.     "sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/sender@example.com",
 7.     "sendingAccountId": "123456789012",
 8.     "messageId": "EXAMPLEe4bccb684-777bc8de-afa7-4970-92b0-f515137b1497-000000",
 9.     "destination": ["recipient@example.com"],
10.     "headersTruncated": false,
11.     "headers": [
12.       {
13.         "name": "From",
14.         "value": "sender@example.com"
15.       },
16.       {
17.         "name": "To",
18.         "value": "recipient@example.com"
19.       },
20.       {
21.         "name": "Subject",
22.         "value": "Message sent from Amazon SES"
23.       },
24.       {
25.         "name": "MIME-Version",
26.         "value": "1.0"
27.       },
28.       {
29.         "name": "Content-Type",
30.         "value": "text/html; charset=UTF-8"
31.       },
32.       {
33.         "name": "Content-Transfer-Encoding",
34.         "value": "7bit"
35.       }
36.     ],
37.     "commonHeaders": {
38.       "from": ["sender@example.com"],
39.       "to": ["recipient@example.com"],
40.       "messageId": "EXAMPLEe4bccb684-777bc8de-afa7-4970-92b0-f515137b1497-000000",
41.       "subject": "Message sent from Amazon SES"
42.     },
43.     "tags": {
44.       "ses:operation": ["SendEmail"],
45.       "ses:configuration-set": ["ConfigSet"],
46.       "ses:source-ip": ["192.0.2.0"],
47.       "ses:from-domain": ["example.com"],
48.       "ses:caller-identity": ["ses_user"],
49.       "myCustomTag1": ["myCustomValue1"],
50.       "myCustomTag2": ["myCustomValue2"]
51.     }
52.   },
53.   "subscription": {
54.     "contactList": "ContactListName",
55.     "timestamp": "2022-01-12T01:00:17.910Z",
56.     "source": "UnsubscribeHeader",
57.     "newTopicPreferences": {
58.       "unsubscribeAll": true,
59.       "topicSubscriptionStatus": [
60.         {
61.           "topicName": "ExampleTopicName",
62.           "subscriptionStatus": "OptOut"
63.         }
64.       ]
65.     },
66.     "oldTopicPreferences": {
67.       "unsubscribeAll": false,
68.       "topicSubscriptionStatus": [
69.         {
70.           "topicName": "ExampleTopicName",
71.           "subscriptionStatus": "OptOut"
72.         }
73.       ]
74.     }
75.   }
76. }
```