

# Monitoring your Amazon SES sending activity
Monitoring sending activity

Amazon SES provides methods to monitor your sending activity using events, metrics, and statistics. An event is something that happens related to your sending activity that you’ve specified to be tracked as a metric. A metric represents a time-ordered set of data points representing the values of a monitored event type producing statistics. Statistics are metric data aggregations for a specified period of time including up to the present. 

These monitoring methods assist you in keeping track of important measures, such as your account's bounce, complaint and reject rates. Excessively high bounce and complaint rates may jeopardize your ability to send emails using SES. These methods can also be used to measure the rates at which your customers engage with the emails you send by helping you to identify your overall open and click through rates utilizing event publishing and custom domains associated with configuration sets - see [Configuring custom domains to handle open and click tracking](configure-custom-open-click-domains.md).

The first step in setting up monitoring is to identify the types of email events related to your sending activity that you want to measure and monitor using SES. You can choose the following event types to monitor in SES:
+ **Send** – The send request was successful and Amazon SES will attempt to deliver the message to the recipient’s mail server. (If account-level or global suppression is being used, SES will still count it as a send, but delivery is suppressed.)
+ **RenderingFailure** – The email wasn't sent because of a template rendering issue. This event type can occur when template data is missing, or when there is a mismatch between template parameters and data. (This event type only occurs when you send email using the [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) or [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) API operations.)
+ **Reject** – Amazon SES accepted the email, but determined that it contained a virus and didn’t attempt to deliver it to the recipient’s mail server.
+ **Delivery** – Amazon SES successfully delivered the email to the recipient's mail server.
+ **Bounce** – A *hard bounce* that the recipient's mail server permanently rejected the email. (*Soft bounces* are only included when SES is no longer retrying to deliver the email. Generally these soft bounces indicate a delivery failure, although in some cases a soft bounce can be returned even when the mail reaches the recipient inbox successfully. This typically occurs when the recipient sends an out-of-office automatic reply. Learn more about soft bounces in this [AWS re:Post article](https://repost.aws/knowledge-center/ses-understand-soft-bounces).)
+ **Complaint** – The email was successfully delivered to the recipient’s mail server, but the recipient marked it as spam.
+ **DeliveryDelay** – The email couldn't be delivered to the recipient’s mail server because a temporary issue occurred. Delivery delays can occur, for example, when the recipient's inbox is full, or when the receiving email server experiences a transient issue.
+ **Subscription** – The email was successfully delivered, but the recipient updated the subscription preferences by clicking `List-Unsubscribe` in the email header or the `Unsubscribe` link in the footer.
+ **Open** – The recipient received the message and opened it in their email client.
+ **Click** – The recipient clicked one or more links in the email.

You can monitor email sending events in several ways. The method you choose depends on the type of event you want to monitor, the granularity and level of detail you want to monitor it with, and the location where you want SES to publish the data. You're required to use either feedback notifications or event publishing to track bounce and complaint events. You can also choose to use multiple monitoring methods. The characteristics of each method are listed in the following table.


| Monitoring Method | Events You Can Monitor | How to Access the Data | Level of Detail | Granularity | 
| --- | --- | --- | --- | --- | 
|  SES console  |  Account health, emails sent, quota used, successful send requests, rejects, bounces & complaints *(recent history to current reputation)*  |  [Account dashboard page](monitor-sending-activity-console.md) in the SES console  |  Count and percentage  |  Across entire AWS account  | 
|  SES console  |  Account health, emails sent, bounces & complaints *(current reputation)*  |  [Reputation metrics page](reputation-dashboard-dg.md) in the SES console  |  Calculated rates only  |  Across entire AWS account  | 
|  Virtual Deliverability Manager  |  Accounts statistics, ISP, sending identities, configuration sets, sent, delivered, complaints, transient & permanent bounces, opens & clicks, deliverability and reputation.  |  [Virtual Deliverability Manager dashboard](vdm-dashboard.md) in the SES console [Virtual Deliverability Manager advisor](vdm-advisor.md) in the SES console  |  Count and percentage  |  Across entire AWS account  | 
|  SES API  |  Deliveries, bounces, complaints, and rejects  |  [https://docs.aws.amazon.com/ses/latest/APIReference/API_GetSendStatistics.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_GetSendStatistics.html) API operation  |  Count only  |  Across entire AWS account  | 
|  Amazon CloudWatch console  |  Sends, deliveries, opens, clicks, bounces, bounce rate, complaints, complaint rate, rejects, rendering failures, and blacklisted IPs.  |  CloudWatch console  Some metrics don't appear in CloudWatch until the associated event occurs. For example, bounce metrics don't appear in CloudWatch until at least one email that you send bounces, or until you generate a simulated bounce event by using the [mailbox simulator](send-an-email-from-console.md).   |  Count only  |  Across entire AWS account  | 
|  Feedback notifications  |  Deliveries, bounces, and complaints  |  Amazon SNS notification (deliveries, bounces, and complaints) or email (bounces and complaints only). See [Setting up event notifications](monitor-sending-activity-using-notifications.md).  |  Details on each event  |  Across entire AWS account  | 
|  Event publishing  |  Sends, deliveries, opens, clicks, bounces, complaints, rejects, and rendering failures.  |  Amazon CloudWatch or Amazon Data Firehose, or by Amazon SNS notification—see [Monitor email sending using event publishing](monitor-using-event-publishing.md).  *(Additional charges apply, see [Price per metric for CloudWatch](event-publishing-add-event-destination-cloudwatch.md#cw-add-pricing).)*  |  Details on each event  |  Fine-grained (based on user-definable email characteristics)  | 
|  Event publishing utilizing custom domains associated with configuration sets - [more info](configure-custom-open-click-domains.md)  |  Open and click tracking.  |  Amazon CloudWatch or Amazon Data Firehose, or by Amazon SNS notification. *(Additional charges apply, see [Price per metric for CloudWatch](event-publishing-add-event-destination-cloudwatch.md#cw-add-pricing).)*  |  Details on each event.  |  Fine-grained (based on user-definable email characteristics)  | 

**Note**  
The metrics measured by email sending events may not align perfectly with your sending quotas. This discrepancy can be caused by email bounces and rejections, or by using the SES inbox simulator. To find out how close you are to your sending quotas, see [Monitoring your sending quotas](manage-sending-quotas-monitor.md).

**Topics**
+ [

# Monitoring your sending statistics using the Amazon SES console
](monitor-sending-activity-console.md)
+ [

# Monitoring your usage statistics using the Amazon SES API
](monitor-sending-activity-api.md)
+ [

# Monitor email sending using Amazon SES event publishing
](monitor-using-event-publishing.md)

# Monitoring your sending statistics using the Amazon SES console
Monitoring using the console

From the Amazon SES console's **Account dashboard**, **Reputation metrics**, and **SMTP settings** pages, you can monitor all your email sending, usage, statistics, SMTP settings, overall account health, and reputation metrics. The following sections describe the metrics and statistics provided on each of these console pages.

It should be noted that while both the [Account dashboard](#account-dashboard) and [Reputation metrics](#reputation-metrics) console pages contain bounce and complaint metrics, there is a subtle difference between these two sets of bounce and complaint rates as explained below:
+ **Account dashboard page** – based on the date range selected, you can view what the bounce and complaint rates were in the past showing the metric progression of change leading up to the present time.
+ **Reputation metrics page** – bounce and complaint rates based on the latest data point received from calculating your overall historic average at a high level (this shouldn’t be confused with your regular bounce/complaint rate, which corresponds to precise bounce/complaint events as they occur in real-time as shown on the **Account dashboard** page).

As a simple example to compare either the bounce or complaint rates between the **Reputation metrics** page and the **Account dashboard** page, let’s say the rate was 2% yesterday and is 1% now, on the **Reputation metrics** page, you'll only see the current rate of 1%, but on the **Account dashboard** page, the graphs will plot the charted progression showing a rate of 2% for yesterday and 1% for today.

## Account dashboard
Account dashboard

You can monitor the number of emails sent from your account, as well as the percentage of your sending quota that's been used, directly from the SES console's **Account dashboard** page in the *Daily email usage* pane. Delivery and rejection rates for your account can be monitored in the *Sending Statistics* pane, as well as other key factors related to your email sending in the following panes:
+ **Sending limits** – contains the following quotas applicable to sending mail through SES:
  + *Daily sending quota* - maximum number of emails that you can send in a 24-hour period.
  + *Maximum send rate* - maximum number of emails that can be send from your account each second.
+ **Account health** – the status of your SES account:
  + `Healthy` - there are no reputation-related issues that currently impact your account.
  + `Under review` - potential issues have been identified with your SES account - your account is under review while you work on correcting the issues.
  + `Paused` - your account's ability to send email is currently paused because of an issue with the email sent from your account. When the issue's been corrected, you can request that your account's ability to send email is resumed.
+ **Daily email usage** – to check your daily usage to ensure you aren’t approaching your sending limits:
  + *Emails sent* - total number of emails sent in a 24-hour period.
  + *Remaining sends* - total number of remaining emails available to be sent in a 24-hour period.
  + *Sending quota used* - percentage of your daily sending quota used.
+ **Sending statistics** – comprised of graphs that show the progression of four essential metrics in a time-ordered set of data points representing the values of a monitored event type producing statistics for the selected date range using an aggregation period of *1 hour*. You can select a data range with start values from `Last 1 day` to `Last 14 days` to filter the charts below:
  + *Sends* - sum of successful email send requests for the date range selected.
  + *Rejects* - average rate of rejected send requests by SES based on `Rejects/Sends * 100` for the date range selected.
  + *Bounces* - average rate derived from your overall historic sender reputation metrics showing the progression for the date range selected.
  + *Complaints* - average rate derived from your overall historic sender reputation metrics showing the progression for the date range selected.

Each of these charts contain a **View in CloudWatch** button that will open the respective metric in the Amazon CloudWatch console allowing detailed data to be viewed, customized metric math performed, and [the creation of alarms in CloudWatch](reputationdashboard-cloudwatch-alarm.md).

## Reputation metrics
Reputation metrics

In addition to bounce and complaint rates, the **Reputation metrics** page also provides other high-level visibility into key factors affecting your reputation consisting of the following panes:
+ **Summary** – provides an overview of your reputation health.
  + *Status* - overall reputation health based on historic bounce and complaint rates:
    + `Healthy` - both metrics are within normal levels.
    + `Under review` - one or both metrics have automatically caused your account to be placed under review.
    + `At risk` - one or both metrics have reached unhealthy levels and your account’s ability to send email may be at risk.
  + *Emails sent (last 24 hours)* — the total number of emails sent in the last 24-hour period.
  + *Remaining sends* — total number of remaining emails available to be sent in a 24-hour period.
  + *Sending quota used* — percentage of your daily sending quota used.
+ **Account-level tab contents:**
  + Bounce rate
    + *Status* - indicates the health of your bounce rate using the same values as described for the Summary pane.
    + *Historic bounce rate* - percentage of emails from your account that resulted in a hard bounce calculated from your overall historic average based on a representative volume that represents your typical sending practices.
  + Complaint rate
    + *Status* - Indicates the health of your complaint rate using the same values as described for the Summary pane.
    + *Historic bounce rate* - percentage of emails sent from your account that resulted in recipients reporting them as spam calculated from your overall historic average based on a representative volume that represents your typical sending practices.
+ **Configuration set tab contents:**
  + Reputation by configuration set
    + *Configuration set* - lets you type or select a configuration set that have reputation metrics enabled so you can see summary, bounce, and complaint data based on the emails sent using the selected configuration set. The resulting panes that appear after selecting a configuration set are the same as described above for the Reputation metrics page except they are based only on email sent with the selected configuration set as apposed to your overall account-level sending metrics.

## SMTP settings
SMTP settings

This page lists the SMTP settings that are required for using the Amazon SES SMTP interface either through the SES API or programmatically, and provides links for creating and managing your SMTP credentials:
+ **SMTP settings** – if you want to use an SMTP-enabled programming language, email server, or application to connect to the Amazon SES SMTP interface, the following information is provided:
  + SMTP endpoint
  + STARTTLS Port
  + Transport Layer Security (TLS)
  + TLS Wrapper Port
  + Authentication links provided for SMTP and IAM credential creation and management

## Using the console to monitor send and reputation metrics
Using the console to monitor metrics

The following procedures will get you started in exploring your send and reputation metrics either using the **Account dashboard** page for metrics based on recent history (up to 14 days), or use the **Reputation metrics** page for metrics based on your overall history to the present time.

**To view emails sent and sending quota used**

1. Sign in to the AWS Management Console and open the Amazon SES console at [https://console.aws.amazon.com/ses/](https://console.aws.amazon.com/ses/).

1. In the navigation pane, choose **Account dashboard**. Your usage statistics are shown in the **Daily email usage** section.

**To view count of sends, rates of rejects, bounces, and complaints**

1. In the navigation pane, choose **Account dashboard**.

1. In the **Sending statistics** section, use the **Date range** dropdown to select a start value for a date range to filter the four charts directly below the **Sending statistics** section.

1. Based on the date range selected, you can view what the counts and rates were in the past showing the metric progression of change leading up to the present time.

1. In any of the charts, choose the **View in CloudWatch** button to open the respective metric in the **Amazon CloudWatch** console where you can view detailed data, perform customized metric math, and [create monitoring alarms in CloudWatch](reputationdashboard-cloudwatch-alarm.md).

**To view overall historic bounce and complaint rates**

1. In the navigation pane, choose **Reputation metrics**.

1. In the **Bounce rate** pane you can view the percentage of emails sent from your account that resulted in a hard bounce, and in the **Complaint rate** pane you can view the percentage of emails sent from your account that resulted in recipients reporting them as spam; both metrics calculated from a representative volume of email based on your typical sending practices.

1. In either of the panes, choose the **View in CloudWatch** button to open the respective metric in the **Amazon CloudWatch** console where you can view detailed data, perform customized metric math, and [create monitoring alarms in CloudWatch](reputationdashboard-cloudwatch-alarm.md).

**To view reputation metrics by configuration sets**

1. In the navigation pane, choose **Reputation metrics**.

1. On the Reputation metrics page, select the **Configuration set** tab.

1. In the **Reputation by configuration set** pane, click inside the **Configuration set** field and either start typing for, or select, a configuration set that has reputation metrics enabled.

1. After selecting the configuration set, it will load the Summary, Bounce, and Complaint panes showing metrics based only on email sent with the selected configuration set.

# Monitoring your usage statistics using the Amazon SES API
Monitor using the API

The Amazon SES API provides the `GetSendStatistics` operation, which returns information about your service usage. We recommend that you check your sending statistics regularly, so that you can make adjustments if needed.

When you call the `GetSendStatistics` operation, you receive a list of data points representing the last two weeks of your sending activity. Each data point in this list represents 15 minutes of activity and contains the following information for that period:
+ The number of hard bounces
+ The number of complaints
+ The number of delivery attempts (corresponds to the number of emails you have sent)
+ The number of rejected send attempts
+ A timestamp for the analysis period

For a complete description of the `GetSendStatistics` operation, see the [Amazon Simple Email Service API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/GetSendStatistics.html).

In this section, you will find the following topics:
+ [Calling the `GetSendStatistics` API operation using the AWS CLI](#monitor-sending-activity-api-cli)
+ [Calling the `GetSendStatistics` operation programmatically](#monitor-sending-activity-api-sdk)

## Calling the `GetSendStatistics` API operation using the AWS CLI


The easiest way to call the `GetSendStatistics` API operation is to use the [AWS Command Line Interface](https://aws.amazon.com/cli) (AWS CLI).

**To call the `GetSendStatistics` API operation using the AWS CLI**

1. If you have not already done so, install the AWS CLI. For more information, see "[Installing the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)" in the *AWS Command Line Interface User Guide*.

1. If you have not already done so, configure the AWS CLI to use your AWS credentials. For more information, see "[Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)" in the *AWS Command Line Interface User Guide*.

1. At the command line, run the following command:

   ```
   aws ses get-send-statistics
   ```

   If the AWS CLI is properly configured, you see a list of sending statistics in JSON format. Each JSON object includes aggregated sending statistics for a 15-minute period.

## Calling the `GetSendStatistics` operation programmatically


You can also call the `GetSendStatistics` operation using the AWS SDKs. This section includes code examples for the AWS SDKs for Go, PHP, Python, and Ruby. Choose one of the following links to view code examples for that language:
+ [Code example for the AWS SDK for Go](#code-example-getsendstatistics-golang)
+ [Code example for the AWS SDK for PHP](#code-example-getsendstatistics-php)
+ [Code example for the AWS SDK for Python (Boto)](#code-example-getsendstatistics-python)
+ [Code example for the AWS SDK for Ruby](#code-example-getsendstatistics-ruby)

**Note**  
These code examples assume that you have created an AWS shared credentials file that contains your AWS access key ID, your AWS secret access key, and your preferred AWS Region. For more information, see [Shared credentials and config files](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html).

### Calling `GetSendStatistics` using the AWS SDK for Go


```
 1. package main
 2.     
 3. import (
 4.     "fmt"
 5.     
 6.     //go get github.com/aws/aws-sdk-go/...
 7.     "github.com/aws/aws-sdk-go/aws"
 8.     "github.com/aws/aws-sdk-go/aws/session"
 9.     "github.com/aws/aws-sdk-go/service/ses"
10.     "github.com/aws/aws-sdk-go/aws/awserr"
11. )
12.     
13. const (
14.     // Replace us-west-2 with the AWS Region you're using for Amazon SES.
15.     AwsRegion = "us-west-2"
16. )
17.     
18. func main() {
19.     
20.     // Create a new session and specify an AWS Region.
21.     sess, err := session.NewSession(&aws.Config{
22.         Region:aws.String(AwsRegion)},
23.     )
24.     
25.     // Create an SES client in the session.
26.     svc := ses.New(sess)
27.     input := &ses.GetSendStatisticsInput{}
28.     
29.     result, err := svc.GetSendStatistics(input)
30.     
31.     // Display error messages if they occur.
32.     if err != nil {
33.         if aerr, ok := err.(awserr.Error); ok {
34.             switch aerr.Code() {
35.             default:
36.                 fmt.Println(aerr.Error())
37.             }
38.         } else {
39.             // Print the error, cast err to awserr.Error to get the Code and
40.             // Message from an error.
41.             fmt.Println(err.Error())
42.         }
43.         return
44.     }
45.     
46.     fmt.Println(result)
47. }
```

### Calling `GetSendStatistics` using the AWS SDK for PHP


```
 1. <?php
 2. 
 3. // Replace path_to_sdk_inclusion with the path to the SDK as described in 
 4. // http://docs.aws.amazon.com/aws-sdk-php/v3/guide/getting-started/basic-usage.html
 5. define('REQUIRED_FILE','path_to_sdk_inclusion');
 6.                                                   
 7. // Replace us-west-2 with the AWS Region you're using for Amazon SES.
 8. define('REGION','us-west-2'); 
 9. 
10. require REQUIRED_FILE;
11. 
12. use Aws\Ses\SesClient;
13. 
14. $client = SesClient::factory(array(
15.     'version'=> 'latest',     
16.     'region' => REGION
17. ));
18. 
19. try {
20.      $result = $client->getSendStatistics([]);
21. 	 echo($result);
22. } catch (Exception $e) {
23.      echo($e->getMessage()."\n");
24. }
25. 
26. ?>
```

### Calling `GetSendStatistics` using the AWS SDK for Python (Boto)


```
 1. import boto3 #pip install boto3
 2. import json
 3. from botocore.exceptions import ClientError
 4. 
 5. client = boto3.client('ses')
 6. 
 7. try:
 8.     response = client.get_send_statistics(
 9. )
10. except ClientError as e:
11.     print(e.response['Error']['Message'])
12. else:
13.     print(json.dumps(response, indent=4, sort_keys=True, default=str))
```

### Calling `GetSendStatistics` using the AWS SDK for Ruby


```
 1. require 'aws-sdk' # gem install aws-sdk
 2. require 'json'
 3. 
 4. # Replace us-west-2 with the AWS Region you're using for Amazon SES.
 5. awsregion = "us-west-2"
 6. 
 7. # Create a new SES resource and specify a region
 8. ses = Aws::SES::Client.new(region: awsregion)
 9. 
10. begin
11. 
12.   resp = ses.get_send_statistics({
13.   })
14.   puts JSON.pretty_generate(resp.to_h)
15. 
16. # If something goes wrong, display an error message.
17. rescue Aws::SES::Errors::ServiceError => error
18.   puts error
19. 
20. end
```

# Monitor email sending using Amazon SES event publishing
Monitor email sending using event publishing

To enable you to track your email sending at a granular level, you can set up Amazon SES to publish *email sending events* to Amazon CloudWatch, Amazon Data Firehose, Amazon Pinpoint, Amazon Simple Notification Service, or Amazon EventBridge based on characteristics that you define.

You can track several types of email sending events, including sends, deliveries, opens, clicks, bounces, complaints, rejections, rendering failures, and delivery delays. This information can be useful for operational and analytical purposes. For example, you can publish your email sending data to CloudWatch and create dashboards that track the performance of your email campaigns, or you can use Amazon SNS to send you notifications when certain events occur.

## How event publishing works with configuration sets and message tags


To use event publishing, you first set up one or more *configuration sets*. A configuration set specifies where to publish your events and which events to publish. Then, each time you send an email, you provide the name of the configuration set and one or more *message tags*, in the form of name/value pairs, to categorize the email. For example, if you advertise books, you could name a message tag *genre*, and assign a value of *sci-fi* or *western*, when you send an email for the associated campaign.

Depending on which email sending interface you use, you either provide the message tag as a parameter to the [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) field of the [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 operation or add the message tag to the SES-specific email header [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). For more information about configuration sets, see [Using configuration sets in Amazon SES](using-configuration-sets.md).

In addition to the message tags that you specify, SES also adds *auto-tags* to the messages you send. You do not need to perform any additional steps to use auto-tags.

The following table lists the auto-tags that are automatically applied to messages you send using SES.


**SES Auto-Tags**  

| Auto-tag name | Description | 
| --- | --- | 
| ses:caller-identity | The IAM identity of the SES user who sent the email. | 
| ses:configuration-set | The name of the Configuration Set associated with the email. | 
| ses:from-domain | The domain of the "From" address. | 
| ses:outgoing-ip | The IP address that SES used to send the email. | 
| ses:source-ip | The IP address that the caller used to send the email. | 
| ses:source-tls-version | The TLS protocol version the caller used to send the email. | 
| ses:outgoing-tls-version | The TLS protocol version that SES used to send the email. | 

## Fine-grained feedback for email campaigns


The `ses:feedback-id-<a or b>` tag is an optional message tag that you can think of as a hybrid or semi-automatic tag—while it's similar to the auto-tags discussed in the previous section, the difference is that you must manually add it and use the `ses:` prefix key. You can use up to two of these tags defined as `ses:feedback-id-a` and `ses:feedback-id-b`.

When you specify these tags, SES automatically appends them to the standard `Feedback-ID` header which is used in providing delivery statistics, such as complaint and spam rates, as part of a feedback loop (FBL), see [Feedback loops](faqs-enforcement.md#cm-feedback-loop). The `Feedback-ID` header is comprised of the identifier, *SESInternalID*, used by SES for collecting complaint information, and the static tag, *AmazonSES*, identifying SES as the sending platform such as:

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

These optional feedback ID tags are offered as a way for you to generate fine-grained feedback, such as for messages you send as part of an email campaign. You can use `ses:feedback-id-<a or b>` by specifying it as a message tag in the [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) field of the [https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html) operation request as shown in the following example:

```
{
  "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"
}
```

If sending in raw format, you would add `ses:feedback-id-<a or b>` as a message tag to the SES-specific header [`X-SES-MESSAGE-TAGS`](event-publishing-send-email.md#event-publishing-using-ses-headers).

The `ses:feedback-id-<a or b>` message tag can also be tracked in Amazon CloudWatch by specifying it as a CloudWatch value source just like any other message tag, see [Adding a CloudWatch Event Destination](event-publishing-add-event-destination-cloudwatch.md#event-publishing-add-event-destination-cloudwatch-add) *(Additional charges apply, see [Price per metric for CloudWatch](event-publishing-add-event-destination-cloudwatch.md#cw-add-pricing).)*

## How to use event publishing


The following sections contain the information you need to set up and use SES event publishing.
+ [Setting up event publishing](monitor-sending-using-event-publishing-setup.md)
+ [Working with event data](working-with-event-data.md)

## Event publishing terminology


The following list defines terms related to SES event publishing.

**Email sending event**  
Information associated with the outcome of an email you submit to SES. Sending events include the following:  
+ **Send** – The send request was successful and Amazon SES will attempt to deliver the message to the recipient’s mail server. (If account-level or global suppression is being used, SES will still count it as a send, but delivery is suppressed.)
+ **RenderingFailure** – The email wasn't sent because of a template rendering issue. This event type can occur when template data is missing, or when there is a mismatch between template parameters and data. (This event type only occurs when you send email using the [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) or [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) API operations.)
+ **Reject** – Amazon SES accepted the email, but determined that it contained a virus and didn’t attempt to deliver it to the recipient’s mail server.
+ **Delivery** – Amazon SES successfully delivered the email to the recipient's mail server.
+ **Bounce** – A *hard bounce* that the recipient's mail server permanently rejected the email. (*Soft bounces* are only included when SES is no longer retrying to deliver the email. Generally these soft bounces indicate a delivery failure, although in some cases a soft bounce can be returned even when the mail reaches the recipient inbox successfully. This typically occurs when the recipient sends an out-of-office automatic reply. Learn more about soft bounces in this [AWS re:Post article](https://repost.aws/knowledge-center/ses-understand-soft-bounces).)
+ **Complaint** – The email was successfully delivered to the recipient’s mail server, but the recipient marked it as spam.
+ **DeliveryDelay** – The email couldn't be delivered to the recipient’s mail server because a temporary issue occurred. Delivery delays can occur, for example, when the recipient's inbox is full, or when the receiving email server experiences a transient issue.
+ **Subscription** – The email was successfully delivered, but the recipient updated the subscription preferences by clicking `List-Unsubscribe` in the email header or the `Unsubscribe` link in the footer.
+ **Open** – The recipient received the message and opened it in their email client.
+ **Click** – The recipient clicked one or more links in the email.

**Configuration set**  
A set of rules that defines the destination that SES publishes email sending events to, and the types of email sending events that you want to publish. When you send an email that you want to use with event publishing, you specify the configuration set to associate with the email.

**Event destination**  
An AWS service that you publish SES email sending events to. Each event destination that you set up belongs to one, and only one, configuration set.

**Message tag**  
A name/value pair that you use to categorize an email for the purpose of event publishing. Examples are *campaign/book* and *campaign/clothing*. When you send an email, you either specify the message tag as a parameter to the API call or as an SES-specific email header.

**Auto-tag**  
Message tags that are automatically included in event publishing reports. There is an auto-tag for the configuration set name, the domain of the "From" address, the caller's outgoing IP address, the SES outgoing IP address, and the IAM identity of the caller.

# Setting up Amazon SES event publishing
Setting up event publishing

This section describes what you need to do to configure Amazon SES to publish your email sending events to the following AWS services:
+ Amazon CloudWatch
+ Amazon Data Firehose
+ Amazon Pinpoint
+ Amazon Simple Notification Service (Amazon SNS)

The following steps required for setting up event publishing are covered in the topics below:

1. You must create a *configuration set* using the Amazon SES console or API.

1. Add one or more *event destinations* (CloudWatch, Firehose, Pinpoint, or SNS) to the configuration set, and configure parameters unique to the event destination.

1. When you send an email, you specify which configuration set to use that contains your event destination.

**Topics**
+ [

# Step 1: Create a configuration set
](event-publishing-create-configuration-set.md)
+ [

# Step 2: Add an event destination
](event-publishing-add-event-destination.md)
+ [

# Step 3: Specify your configuration set when you send email
](event-publishing-send-email.md)

# Step 1: Create a configuration set
Step 1: Create a configuration set

You must first have a configuration set to set up event publishing. If you do not yet have a configuration set, or would like to create a new one, please see [Creating configuration sets in SES](creating-configuration-sets.md)

You can also create configuration sets using the [CreateConfigurationSet](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_CreateConfigurationSet.html) operation in the Amazon SES API V2 or the Amazon SES CLI v2, see [Create a configuration set (AWS CLI)](creating-configuration-sets.md#config-sets-create-cli). 

# Step 2: Add an event destination
Step 2: Add event destination

Event destinations are places that you publish Amazon SES events to. Each event destination that you set up belongs to one, and only one, configuration set. When you set up an event destination with Amazon SES, you choose the AWS service destination, and you specify parameters associated with that destination. 

When you set up an event destination, you can choose to send events to one of the following AWS services:
+ Amazon CloudWatch
+ Amazon Data Firehose
+ Amazon EventBridge
+ Amazon Pinpoint
+ Amazon Simple Notification Service (Amazon SNS)

The event destination that you choose depends on the level of detail you want about the events, and the way you want to receive the event information. If you simply want a running total of each type of event (for example, so that you can set an alarm when the total gets too high), you can use CloudWatch.

If you want detailed event records that you can output to another service such as Amazon OpenSearch Service or Amazon Redshift for analysis, you can use Firehose.

If you want to receive notifications when certain events occur, you can use Amazon SNS.

**Topics**
+ [

# Set up a CloudWatch event destination for event publishing
](event-publishing-add-event-destination-cloudwatch.md)
+ [

# Set up a Data Firehose event destination for Amazon SES event publishing
](event-publishing-add-event-destination-firehose.md)
+ [

# Set up an Amazon EventBridge destination for event publishing
](event-publishing-add-event-destination-eventbridge.md)
+ [

# Set up an Amazon Pinpoint event destination for event publishing
](event-publishing-add-event-destination-pinpoint.md)
+ [

# Set up an Amazon SNS event destination for event publishing
](event-publishing-add-event-destination-sns.md)

# Set up a CloudWatch event destination for event publishing
Set up a CloudWatch destination

With [Amazon CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html), you can use event destinations to publish Amazon SES email sending events to CloudWatch. Because a CloudWatch event destination can only be set up in a configuration set, you must first [create a configuration set](event-publishing-create-configuration-set.md) and then add the event destination to the configuration set.

When you add a CloudWatch event destination to a configuration set, you must choose one or more CloudWatch *dimensions* that correspond to the message tags you use when you send your emails. Like message tags, a CloudWatch dimension is a name/value pair that helps you uniquely identify a metric.

For example, you might have a message tag and a dimension called `campaign` that you use to identify your email campaign. When you publish your email sending events to CloudWatch, choosing your message tags and dimensions is important because these choices affect your CloudWatch billing and determine how you can filter your email sending event data in CloudWatch.

This section provides information to help you choose your dimensions, and then shows how to add a CloudWatch event destination to a configuration set.

**Topics**
+ [

## Adding a CloudWatch Event Destination
](#event-publishing-add-event-destination-cloudwatch-add)
+ [

## Choosing CloudWatch Dimensions
](#event-publishing-add-event-destination-cloudwatch-dimensions)

## Adding a CloudWatch Event Destination
Adding CloudWatch Event Destination Details

The procedure in this section shows how to add CloudWatch event destination details to a configuration set and assumes you have completed steps 1 through 6 in [Creating an event destination](event-destinations-manage.md#event-destination-add).

You can also use the [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) operation in the Amazon SES API V2 to create and modify event destinations.

**To add CloudWatch event destination details to a configuration set using the console**

1. These are the detailed instructions for selecting CloudWatch as your event destination type in [Step 7](event-destinations-manage.md#specify-event-dest-step) and assumes you have completed all the previous steps in [Creating an event destination](event-destinations-manage.md#event-destination-add). After selecting the CloudWatch **Destination type**, entering a destination **Name**, and enabling **Event publishing**, the **Amazon CloudWatch dimensions** pane is displayed—its fields are addressed in the following steps. *(Additional charges apply, see [Price per metric for CloudWatch](#cw-add-pricing).)* 

1. For **Value Source**, specify how Amazon SES will obtain the data that it passes to CloudWatch. The following value sources are available:
   + **Message Tag** – Amazon SES retrieves the dimension name and value from a tag that you specify by using the `X-SES-MESSAGE-TAGS` header or the `EmailTags` API parameter. For more information about using message tags, see [Step 3: Specify your configuration set when you send email](event-publishing-send-email.md).
**Note**  
Message tags can include the numbers 0–9, the letters A–Z (both uppercase and lowercase), hyphens (-), and underscores (\$1).

     You can also use the **Message Tag** value source to create dimensions based on Amazon SES auto-tags. To use an auto-tag, type the complete name of the auto-tag as the **Dimension Name**. For example, to create a dimension based on the configuration set auto-tag, use `ses:configuration-set` for the **Dimension Name**, and the name of the configuration set for the **Default Value**. For a complete list of auto-tags, see [How event publishing works with configuration sets and message tags](monitor-using-event-publishing.md#event-publishing-how-works).
   + **Email Header** – Amazon SES retrieves the dimension name and value from a header in the email.
**Note**  
You can't use any of the following email headers as the **Dimension Name**: `Received`, `To`, `From`, `DKIM-Signature`, `CC`, `message-id`, or `Return-Path`.
   + **Link Tag** – Amazon SES retrieves the dimension name and value from a tag that you specified in a link. For more information about adding tags to links, see [Can I tag links with unique identifiers?](faqs-metrics.md#sending-metric-faqs-clicks-q5).

1. For **Dimension Name**, type the name of the dimension that you want to pass to CloudWatch.
**Note**  
Dimension names can contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (\$1), and dashes (-). Spaces, accented characters, non-Latin characters, and other special characters are not allowed.

1. For **Default Value**, type the value of the dimension.
**Note**  
Dimension values can contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (\$1), dashes (-), at signs (@), and periods (.). Spaces, accented characters, non-Latin characters, and other special characters are not allowed.

1. If you want to add more dimensions, choose **Add Dimension**. Otherwise, choose **Next**.

1. On the review screen, if you're satisfied with how you defined your event destination, choose **Add destination**.

## Choosing CloudWatch Dimensions
Choosing CloudWatch Dimensions

When you choose names and values to use as CloudWatch dimensions, consider the following factors:
+ **Price per metric** – You can view basic Amazon SES metrics in CloudWatch for free. However, when you collect metrics using event publishing, you incur [CloudWatch Detailed Monitoring](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-metrics-basic-detailed.html) costs. Each unique combination of event type, dimension name, and dimension value creates a different metric in CloudWatch. When you use CloudWatch, Detailed Monitoring, you are charged for each metric. For this reason, you might want to avoid choosing dimensions that can take many different values. For example, unless you are very interested in tracking your email sending events by "From" domain, you might not want to define a dimension for the Amazon SES auto-tag `ses:from-domain` because it can take many different values. For more information, see [CloudWatch Pricing](https://aws.amazon.com/cloudwatch/pricing).
+ **Metric filtering** – If a metric has multiple dimensions, you cannot access the metric in CloudWatch based on each dimension separately. For that reason, think carefully before you add more than one dimension to a single CloudWatch event destination. For example, if you want metrics by `campaign` and by a combination of `campaign` and `genre`, you need to add two event destinations: one with only `campaign` as a dimension, and one with both `campaign` and `genre` as dimensions.
+ **Dimension value source** – As an alternative to specifying your dimension values using Amazon SES-specific headers or a parameter to the API, you can also choose for Amazon SES to take the dimension values from your own MIME message headers. You might use this option if you are already using custom headers and you do not want to change your emails or your calls to the email sending API to collect metrics based on your header values. If you use your own MIME message headers for Amazon SES event publishing, the header names and values that you use for Amazon SES event publishing may only include the letters A through Z, the numbers 0 through 9, underscores (\$1), at signs (@), hyphens (-), and periods (.). If you specify a name or value that contains other characters, the email sending call will still succeed, but the event metrics will not be sent to Amazon CloudWatch.

For more information about CloudWatch concepts, see [Amazon CloudWatch Concepts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html) in the *Amazon CloudWatch User Guide*.

# Set up a Data Firehose event destination for Amazon SES event publishing
Set Up a Data Firehose destination

An Amazon Data Firehose event destination represents an entity that publishes specific Amazon SES email sending events to Firehose. Because a Firehose event destination can only be set up in a configuration set, you first have to [create a configuration set](event-publishing-create-configuration-set.md). Next, you add the event destination to the configuration set.

The procedure in this section shows how to add Firehose event destination details to a configuration set and assumes you have completed steps 1 through 6 in [Creating an event destination](event-destinations-manage.md#event-destination-add).

You can also use the [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) operation in the Amazon SES API V2 destination to create and update event destinations. 

**To add Firehose event destination details to a configuration set using the console**

1. These are the detailed instructions for selecting Firehose as your event destination type in [Step 7](event-destinations-manage.md#specify-event-dest-step) and assumes you have completed all the previous steps in [Creating an event destination](event-destinations-manage.md#event-destination-add). After selecting the Firehose **Destination type**, entering a destination **Name**, and enabling **Event publishing**, the **Amazon Data Firehose delivery stream** pane is displayed—its fields are addressed in the following steps.

1. For **Delivery stream**, choose an existing Firehose delivery stream, or choose **Create new stream** to create a new one using the Firehose console.

   For information about creating a stream using the Firehose console, see [Creating an Amazon Kinesis Firehose Delivery Stream](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html) in the *Amazon Data Firehose Developer Guide*.

1. For **Identity and Access Management (IAM) Role**, choose an IAM role for which Amazon SES has permission to publish to Firehose on your behalf. You can choose an existing role, have Amazon SES create a role for you, or create your own role.

   If you choose an existing role or create your own role, you must manually modify the role's policies to give the role permission to access the Firehose delivery stream, and to give Amazon SES permission to assume the role. For example policies, see [Giving Amazon SES Permission to Publish to Your Firehose Delivery Stream](#event-publishing-add-event-destination-firehose-role). 

1. Choose **Next**.

1. On the review screen, if you're satisfied with how you defined your event destination, choose **Add destination**.

For information about how to use the `UpdateConfigurationSetEventDestination` API to add a Firehose event destination, see the [Amazon Simple Email Service API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/API_UpdateConfigurationSetEventDestination.html).

## Giving Amazon SES Permission to Publish to Your Firehose Delivery Stream
Giving Amazon SES Permission to Publish to Your Firehose Delivery Stream

To enable Amazon SES to publish records to your Firehose delivery stream, you must use an AWS Identity and Access Management (IAM) [role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) and attach or modify the role's permissions policy and trust policy. The permissions policy enables the role to publish records to your Firehose delivery stream, and the trust policy enables Amazon SES to assume the role.

This section provides examples of both policies. For information about attaching policies to IAM roles, see [Modifying a Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_modify.html) in the *IAM User Guide*. 

### Permissions Policy


The following permissions policy enables the role to publish data records to your Firehose delivery stream.

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

****  

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

------

Make the following changes to the preceding policy example:
+ Replace *delivery-region* with the AWS Region where you created the Firehose delivery stream.
+ Replace *111122223333* with your AWS account ID.
+ Replace *delivery-stream-name* with the name of the Firehose delivery stream.

### Trust Policy


The following trust policy enables Amazon SES to assume the role.

------
#### [ 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"
        }
      }
    }
  ]
}
```

------

Make the following changes to the preceding policy example:
+ Replace *delivery-region* with the AWS Region where you created the Firehose delivery stream.
+ Replace *111122223333* with your AWS account ID.
+ Replace *configuration-set-name* with the name of your configuration set associated with the Firehose delivery stream.

# Set up an Amazon EventBridge destination for event publishing
Set up an EventBridge destination

An Amazon EventBridge event destination notifies you about the email sending events you specify in a configuration set. SES generates and sends email sending events that you define when creating an event destination to the EventBridge default event bus. An [event bus](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus.html) is a router that receives events and can deliver them to multiple destinations. You can learn more about integrating email sending events with Amazon EventBridge in [Monitoring SES events using Amazon EventBridge](monitoring-eventbridge.md). Because an EventBridge event destination can only be set up in a configuration set, you have to [create a configuration set](event-publishing-create-configuration-set.md) before you add the event destination to the configuration set.

The procedure in this section shows how to add EventBridge event destination details to a configuration set and assumes you have completed steps 1 through 6 in [Creating an event destination](event-destinations-manage.md#event-destination-add).

You can also use the [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) operation in the Amazon SES API V2 to create and modify event destinations.

**To add EventBridge event destination details to a configuration set using the console**

1. These are the detailed instructions for selecting EventBridge as your event destination type in [Step 7](event-destinations-manage.md#specify-event-dest-step) and assumes you have completed all the previous steps in [Creating an event destination](event-destinations-manage.md#event-destination-add). After selecting the *Amazon EventBridge* **Destination type**, entering a destination **Name**, and enabling **Event publishing**, an **Amazon EventBridge event bus** informational pane is displayed.

1. Choose **Next**.

1. On the review screen, if you're satisfied with how you defined your event destination, choose **Add destination**. This will open the event destination's summary page where a success banner will confirm if your event destination was created or modified successfully.

# Set up an Amazon Pinpoint event destination for event publishing
Set up an Amazon Pinpoint destination

An Amazon Pinpoint event destination notifies you about the email sending events you specify in a configuration set. Because an Amazon Pinpoint event destination can only be set up in a configuration set, you have to [create a configuration set](event-publishing-create-configuration-set.md) before you add the event destination to the configuration set.

The procedure in this section shows how to add Amazon Pinpoint event destination details to a configuration set and assumes you have completed steps 1 through 6 in [Creating an event destination](event-destinations-manage.md#event-destination-add).

You can also use the [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) operation in the Amazon SES API V2 to create and modify event destinations.

There are additional charges for the types of channels you have configured in your Amazon Pinpoint projects. For more information, see [Amazon Pinpoint Pricing](https://aws.amazon.com/pinpoint/pricing/).

**To add Amazon Pinpoint event destination details to a configuration set using the console**

1. These are the detailed instructions for selecting Amazon Pinpoint as your event destination type in [Step 7](event-destinations-manage.md#specify-event-dest-step) and assumes you have completed all the previous steps in [Creating an event destination](event-destinations-manage.md#event-destination-add).
**Note**  
Amazon Pinpoint does not support event types **Delivery delays** or **Subscriptions**.

   After selecting the Amazon Pinpoint **Destination type**, entering a destination **Name**, and enabling **Event publishing**, the **Amazon Pinpoint project details** pane is displayed—its fields are addressed in the following steps.

1. For **Project**, choose an existing Amazon Pinpoint project, or choose **Create a new project in Amazon Pinpoint** to create a new one.

   For information about creating a project, see [Create a project](https://docs.aws.amazon.com/pinpoint/latest/userguide/gettingstarted-create-project.html) in the *Amazon Pinpoint User Guide*.

1. Choose **Next**.

1. On the review screen, if you're satisfied with how you defined your event destination, choose **Add destination**. This will open the event destination's summary page where a success banner will confirm if your event destination was created or modified successfully.

# Set up an Amazon SNS event destination for event publishing
Set up an Amazon SNS destination

An Amazon SNS event destination notifies you about the email sending events you specify in a configuration set. Because an Amazon SNS event destination can only be set up in a configuration set, you have to [create a configuration set](event-publishing-create-configuration-set.md) before you add the event destination to the configuration set.

The procedure in this section shows how to add Amazon SNS event destination details to a configuration set and assumes you have completed steps 1 through 6 in [Creating an event destination](event-destinations-manage.md#event-destination-add).

You can also use the [UpdateConfigurationSetEventDestination](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_UpdateConfigurationSetEventDestination.html) operation in the Amazon SES API V2 to create and modify event destinations.

**Note**  
Feedback notifications for bounces, complaints, and deliveries can also be set up through Amazon SNS for any of your verified sending identities. For more information, see. [Configuring Amazon SNS notifications for Amazon SES](configure-sns-notifications.md).

There are additional charges for sending messages to the endpoints that are subscribed to your Amazon SNS topics. For more information, see [Amazon SNS Pricing](https://aws.amazon.com/sns/pricing/).

**To add Amazon SNS event destination details to a configuration set using the console**

1. These are the detailed instructions for selecting Amazon SNS as your event destination type in [Step 7](event-destinations-manage.md#specify-event-dest-step) and assumes you have completed all the previous steps in [Creating an event destination](event-destinations-manage.md#event-destination-add). After selecting the Amazon SNS **Destination type**, entering a destination **Name**, and enabling **Event publishing**, the **Amazon Simple Notification Service (SNS) topic** pane is displayed—its fields are addressed in the following steps.

1. For **SNS topic**, choose an existing Amazon SNS topic, or choose **Create SNS topic** to create a new one.

   For information about creating a topic, see [Create a Topic](https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html) in the *Amazon Simple Notification Service Developer Guide*.
**Important**  
When you create your topic using Amazon SNS, for **Type**, only choose **Standard**. (SES does not support FIFO type topics.)

1. Choose **Next**.

1. On the review screen, if you're satisfied with how you defined your event destination, choose **Add destination**. This will open the event destination's summary page where a success banner will confirm if your event destination was created or modified successfully.

1. Whether you created a new SNS topic or selected an existing one, you will now need to give access to SES to publish notifications to the topic. On the event destination's summary page from the previous step, choose **Amazon SNS** from the **Destination type** column - this will take you to the **Topics** list in the Amazon Simple Notification Service console - *perform the following steps from the Amazon SNS console:*

   1. Select the name of the SNS topic you created or modified in the previous step.

   1. On the topic's detail screen, choose **Edit**.

   1. To give SES permission to publish notifications to the topic, on the **Edit topic** screen in the SNS console, expand **Access policy** and in the **JSON editor**, add the following permission policy:

------
#### [ 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"
                      }
                  }
              }
          ]
      }
      ```

------

      Make the following changes to the preceding policy example:
      + Replace *topic\$1region* with the AWS Region where you created the SNS topic.
      + Replace *111122223333* with your AWS account ID.
      + Replace *topic\$1name* with the name of your SNS topic.
      + Replace *configuration-set-name* with the name of your configuration set associated with the SNS event destination.

   1. Choose **Save changes**.

# Step 3: Specify your configuration set when you send email
Step 3: Specify your configuration set when sending

After you [create a configuration set](event-publishing-create-configuration-set.md) and [add an event destination](event-publishing-add-event-destination.md), the last step to event publishing is to send your emails.

To publish events associated with an email, you must provide the name of the configuration set to associate with the email. Optionally, you can provide message tags to categorize the email.

You provide this information to Amazon SES as either parameters to the email sending API, Amazon SES-specific email headers, or custom headers in your MIME message. The method you choose depends on which email sending interface you use, as shown in the following table.


****  

| Email Sending Interface | Ways to Publish Events | 
| --- | --- | 
|  `SendEmail`  |  API parameters  | 
|  `SendTemplatedEmail`  |  API parameters  | 
|  `SendBulkTemplatedEmail`  |  API parameters  | 
|  `SendCustomVerificationEmail`  |  API parameters  | 
|  `SendRawEmail`  |  API parameters, Amazon SES-specific email headers, or custom MIME headers   If you specify message tags using both headers and API parameters, Amazon SES uses only the message tags provided by the API parameters. Amazon SES does not join message tags specified by API parameters and headers.    | 
|  SMTP interface  |  Amazon SES-specific email headers  | 

The following sections describe how to specify the configuration set and message tags using headers and using API parameters.
+ [Using Amazon SES API Parameters](#event-publishing-using-ses-parameters)
+ [Using Amazon SES-Specific Email Headers](#event-publishing-using-ses-headers)
+ [Using Custom Email Headers](#event-publishing-using-custom-headers)

**Note**  
You can optionally include message tags in the headers of your emails. Message tags can include the numbers 0–9, the letters A–Z (both uppercase and lowercase), hyphens (-), and underscores (\$1).

## Using Amazon SES API Parameters


To use [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), or [SendRawEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendRawEmail.html) with event publishing, you specify the configuration set and the message tags by passing data structures called [ConfigurationSet](https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html) and [MessageTag](https://docs.aws.amazon.com/ses/latest/APIReference/API_MessageTag.html) to the API call.

For more information about using the Amazon SES API, see the [Amazon Simple Email Service API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/).

## Using Amazon SES-Specific Email Headers


When you use `SendRawEmail` or the SMTP interface, you can specify the configuration set and the message tags by adding Amazon SES-specific headers to the email. Amazon SES removes the headers before sending the email. The following table shows the names of the headers to use. 


| Event Publishing Information | Header | 
| --- | --- | 
|  Configuration set  |  `X-SES-CONFIGURATION-SET`  | 
|  Message tags  |  `X-SES-MESSAGE-TAGS`  | 

The following example shows how the headers might look in a raw email that you submit to 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--
```

## Using Custom Email Headers


Although you must specify the configuration set name using the Amazon SES-specific header `X-SES-CONFIGURATION-SET`, you can specify the message tags by using your own MIME headers.

**Note**  
Header names and values that you use for Amazon SES event publishing must be in ASCII. If you specify a non-ASCII header name or value for Amazon SES event publishing, the email sending call will still succeed, but the event metrics will not be emitted to Amazon CloudWatch.

# Working with Amazon SES event data
Working with event data

After you [set up event publishing](monitor-sending-using-event-publishing-setup.md) and specify a configuration set for sending emails, you can retrieve your email sending events from the event destination that you specified when you set up the configuration set associated with the email.

This section describes how to retrieve your email sending events from Amazon CloudWatch and Amazon Data Firehose, and how to interpret event data provided by Amazon SNS.
+ [Retrieving Amazon SES event data from CloudWatch](event-publishing-retrieving-cloudwatch.md)
+ [Retrieving Amazon SES event data from Firehose](event-publishing-retrieving-firehose.md)
+ [Interpreting Amazon SES event data from Amazon SNS](event-publishing-retrieving-sns.md)

# Retrieving Amazon SES event data from CloudWatch
Retrieving event data from CloudWatch

Amazon SES can publish metrics for your email sending events to Amazon CloudWatch. When you publish event data to CloudWatch, it provides these metrics as an ordered set of time-series data. You can use these metrics to monitor the performance of your email sending. For example, you can monitor the complaint metric and set a CloudWatch alarm to trigger when the metric exceeds a certain value.

There are two levels of granularity at which Amazon SES can publish these events to CloudWatch:
+ **Across your AWS account** – These coarse metrics, which correspond to the metrics you monitor using the Amazon SES console and the `GetSendStatistics` API, are totals across your entire AWS account. Amazon SES publishes these metrics to CloudWatch automatically.
+ **Fine-grained** – These metrics are categorized by email characteristics that you define using *message tags*. To publish these metrics to CloudWatch, you have to [set up event publishing](monitor-sending-using-event-publishing-setup.md) with a CloudWatch event destination and [specify a configuration set](event-publishing-send-email.md) when you send an email. You can also specify message tags or use [auto-tags](monitor-using-event-publishing.md#event-publishing-how-works) that Amazon SES automatically provides.

This section describes the available metrics and how to view the metrics in CloudWatch.

## Available Metrics


You can publish following Amazon SES email sending metrics to CloudWatch:
+ **Send** – The send request was successful and Amazon SES will attempt to deliver the message to the recipient’s mail server. (If account-level or global suppression is being used, SES will still count it as a send, but delivery is suppressed.)
+ **RenderingFailure** – The email wasn't sent because of a template rendering issue. This event type can occur when template data is missing, or when there is a mismatch between template parameters and data. (This event type only occurs when you send email using the [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) or [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) API operations.)
+ **Reject** – Amazon SES accepted the email, but determined that it contained a virus and didn’t attempt to deliver it to the recipient’s mail server.
+ **Delivery** – Amazon SES successfully delivered the email to the recipient's mail server.
+ **Bounce** – A *hard bounce* that the recipient's mail server permanently rejected the email. (*Soft bounces* are only included when SES is no longer retrying to deliver the email. Generally these soft bounces indicate a delivery failure, although in some cases a soft bounce can be returned even when the mail reaches the recipient inbox successfully. This typically occurs when the recipient sends an out-of-office automatic reply. Learn more about soft bounces in this [AWS re:Post article](https://repost.aws/knowledge-center/ses-understand-soft-bounces).)
+ **Complaint** – The email was successfully delivered to the recipient’s mail server, but the recipient marked it as spam.
+ **DeliveryDelay** – The email couldn't be delivered to the recipient’s mail server because a temporary issue occurred. Delivery delays can occur, for example, when the recipient's inbox is full, or when the receiving email server experiences a transient issue.
+ **Subscription** – The email was successfully delivered, but the recipient updated the subscription preferences by clicking `List-Unsubscribe` in the email header or the `Unsubscribe` link in the footer.
+ **Open** – The recipient received the message and opened it in their email client.
+ **Click** – The recipient clicked one or more links in the email.

## Available Dimensions


CloudWatch uses the dimension names that you specify when you add a CloudWatch event destination to a configuration set in Amazon SES. For more information, see [Set up a CloudWatch event destination for event publishing](event-publishing-add-event-destination-cloudwatch.md).

## Viewing Amazon SES Metrics in the CloudWatch Console


The following procedure describes how to view your Amazon SES event publishing metrics using the CloudWatch console.

**To view metrics using the CloudWatch console**

1. Sign in to the AWS Management Console and open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. If necessary, change the region. From the navigation bar, select the region where your AWS resources reside. For more information, see [Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html).

1. In the navigation pane, choose **All Metrics**.

1. In the **Metrics** pane, select **SES**.

1. Select the metric you want to view. To view fine-grained [event publishing metrics](monitor-using-event-publishing.md), choose the combination of dimensions that you specified when you [set up your CloudWatch event destination](event-publishing-add-event-destination-cloudwatch.md). To learn more about viewing metrics with CloudWatch, see [Use Amazon CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html).

**To view metrics using the AWS CLI**
+ At a command prompt, use the following command:

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

# Retrieving Amazon SES event data from Firehose
Retrieving event data from Firehose

Amazon SES publishes email sending events to Firehose as JSON records. Firehose then publishes the records to the AWS service destination that you chose when you set up the delivery stream in Firehose. For information about setting up Firehose delivery streams, see [Creating an Firehose Delivery Stream](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html) in the *Amazon Data Firehose Developer Guide*. 

**Topics**
+ [

# Contents of event data that Amazon SES publishes to Firehose
](event-publishing-retrieving-firehose-contents.md)
+ [

# Examples of event data that Amazon SES publishes to Firehose
](event-publishing-retrieving-firehose-examples.md)

# Contents of event data that Amazon SES publishes to Firehose
Event record contents

Amazon SES publishes email sending event records to Amazon Data Firehose in JSON format. When publishing events to Firehose, Amazon SES follows each JSON record with a newline character.

You can find example records for all of these notification types in [Examples of event data that Amazon SES publishes to Firehose](event-publishing-retrieving-firehose-examples.md).

**Topics**
+ [

## Top-level JSON object
](#event-publishing-retrieving-firehose-contents-top-level-json-object)
+ [

## Mail object
](#event-publishing-retrieving-firehose-contents-mail-object)
+ [

## Bounce object
](#event-publishing-retrieving-firehose-contents-bounce-object)
+ [

## Complaint object
](#event-publishing-retrieving-firehose-contents-complaint-object)
+ [

## Delivery object
](#event-publishing-retrieving-firehose-contents-delivery-object)
+ [

## Send object
](#event-publishing-retrieving-firehose-contents-send-object)
+ [

## Reject object
](#event-publishing-retrieving-firehose-contents-reject-object)
+ [

## Open object
](#event-publishing-retrieving-firehose-contents-open-object)
+ [

## Click object
](#event-publishing-retrieving-firehose-contents-click-object)
+ [

## Rendering Failure object
](#event-publishing-retrieving-firehose-contents-failure-object)
+ [

## DeliveryDelay object
](#event-publishing-retrieving-firehose-delivery-delay-object)
+ [

## Subscription object
](#event-publishing-retrieving-firehose-subscription-object)

## Top-level JSON object
Top-level JSON object

The top-level JSON object in an email sending event record contains the following fields.


| Field Name | Description | 
| --- | --- | 
|  `eventType`  |  A string that describes the type of event. Possible values: `Bounce`, `Complaint`, `Delivery`, `Send`, `Reject`, `Open`, `Click`, `Rendering Failure`, `DeliveryDelay`, or `Subscription`. If you did not [set up event publishing](monitor-sending-using-event-publishing-setup.md) this field is named `notificationType`.  | 
|  `mail`  |  A JSON object that contains information about the email that produced the event.  | 
|  `bounce`  |  This field is only present if `eventType` is `Bounce`. It contains information about the bounce.  | 
|  `complaint`  |  This field is only present if `eventType` is `Complaint`. It contains information about the complaint.  | 
|  `delivery`  |  This field is only present if `eventType` is `Delivery`. It contains information about the delivery.  | 
|  `send`  |  This field is only present if `eventType` is `Send`.  | 
|  `reject`  |  This field is only present if `eventType` is `Reject`. It contains information about the rejection.  | 
|  `open`  |  This field is only present if `eventType` is `Open`. It contains information about the open event.  | 
|  `click`  |  This field is only present if `eventType` is `Click`. It contains information about the click event.  | 
| `failure` | This field is only present if `eventType` is `Rendering Failure`. It contains information about the rendering failure event. | 
|  `deliveryDelay`  |  This field is only present if `eventType` is `DeliveryDelay`. It contains information about the delayed delivery of an email.  | 
|  `subscription`  |  This field is only present if `eventType` is `Subscription`. It contains information about the subscription preferences.  | 

## Mail object
`mail` object

Each email sending event record contains information about the original email in the `mail` object. The JSON object that contains information about a `mail` object has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `timestamp`  |  The date and time, in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*), when the message was sent.  | 
|  `messageId`  |  A unique ID that Amazon SES assigned to the message. Amazon SES returned this value to you when you sent the message.  This message ID was assigned by Amazon SES. You can find the message ID of the original email in the `headers` and `commonHeaders` fields of the `mail` object.   | 
|  `source`  |  The email address that the message was sent from (the envelope MAIL FROM address).  | 
|  `sourceArn`  |  The Amazon Resource Name (ARN) of the identity that was used to send the email. In the case of sending authorization, the `sourceArn` is the ARN of the identity that the identity owner authorized the delegate sender to use to send the email. For more information about sending authorization, see [Email authentication methodsUsing sending authorization](sending-authorization.md).  | 
|  `sendingAccountId`  |  The AWS account ID of the account that was used to send the email. In the case of sending authorization, the `sendingAccountId` is the delegate sender's account ID.  | 
|  `destination`  |  A list of email addresses that were recipients of the original mail.  | 
|  `headersTruncated`  |  A string that specifies whether the headers are truncated in the notification, which occurs if the headers are larger than 10 KB. Possible values are `true` and `false`.  | 
|  `headers`  |  A list of the email's original headers. Each header in the list has a `name` field and a `value` field.  Any message ID within the `headers` field is from the original message that you passed to Amazon SES. The message ID that Amazon SES subsequently assigned to the message is in the `messageId` field of the `mail` object.   | 
|  `commonHeaders`  |  A mapping of the email's original, commonly used headers.  Any message ID within the `commonHeaders` field is the message ID that Amazon SES subsequently assigned to the message in the `messageId` field of the `mail` object.   | 
|  `tags`  |  A list of tags associated with the email.  | 

## Bounce object


The JSON object that contains information about a `Bounce` event will always have the following fields.


| Field Name | Description | 
| --- | --- | 
|  `bounceType`  |  The type of bounce, as determined by Amazon SES.  | 
|  `bounceSubType`  |  The subtype of the bounce, as determined by Amazon SES.  | 
|  `bouncedRecipients`  |  A list that contains information about the recipients of the original mail that bounced.  | 
|  `timestamp`  |  The date and time, in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*), when the ISP sent the bounce notification.  | 
|  `feedbackId`  |  A unique ID for the bounce.  | 
|  `reportingMTA`  |  The value of the `Reporting-MTA` field from the DSN. This is the value of the Message Transfer Authority (MTA) that attempted to perform the delivery, relay, or gateway operation described in the DSN.  This field only appears if a delivery status notification (DSN) was attached to the bounce.   | 

### Bounced recipients


A bounce event may pertain to a single recipient or to multiple recipients. The `bouncedRecipients` field holds a list of objects—one object per recipient to whom the bounce event pertains—and will always contain the following field.


| Field Name | Description | 
| --- | --- | 
|  `emailAddress`  |  The email address of the recipient. If a DSN is available, this is the value of the `Final-Recipient` field from the DSN.  | 

Optionally, if a DSN is attached to the bounce, the following fields may also be present.


| Field Name | Description | 
| --- | --- | 
|  `action`  |  The value of the `Action` field from the DSN. This indicates the action performed by the reporting MTA as a result of its attempt to deliver the message to this recipient.  | 
|  `status`  |  The value of the `Status` field from the DSN. This is the per-recipient transport-independent status code that indicates the delivery status of the message.  | 
|  `diagnosticCode`  |  The status code issued by the reporting MTA. This is the value of the `Diagnostic-Code` field from the DSN. This field may be absent in the DSN (and therefore also absent in the JSON).  | 

### Bounce types


Each bounce event will be of one of the types shown in the following table.

The event publishing system only publishes hard bounces and soft bounces that will no longer be retried by Amazon SES. When you receive bounces marked `Permanent`, you should remove the corresponding email addresses from your mailing list; you will not be able to send to them in the future. `Transient` bounces are sent to you when a message has soft bounced several times, and Amazon SES has stopped trying to re-deliver it. You may be able to successfully resend to an address that initially resulted in a `Transient` bounce in the future.


| bounceType | bounceSubType | Description | 
| --- | --- | --- | 
|  `Undetermined`  |  `Undetermined`  |  Amazon SES was unable to determine a specific bounce reason.  | 
|  `Permanent`  |  `General`  |  Amazon SES received a general hard bounce. If you receive this type of bounce, you should remove the recipient's email address from your mailing list.  | 
|  `Permanent`  |  `NoEmail`  |  Amazon SES received a permanent hard bounce because the target email address does not exist. If you receive this type of bounce, you should remove the recipient's email address from your mailing list.  | 
|  `Permanent`  |  `Suppressed`  |  Amazon SES has suppressed sending to this address because it has a recent history of bouncing as an invalid address. To override the global suppression list, see [Using the Amazon SES account-level suppression list](sending-email-suppression-list.md).   | 
| Permanent | OnAccountSuppressionList | Amazon SES has suppressed sending to this address because it is on the [account-level suppression list](sending-email-suppression-list.md). This does not count toward your bounce rate metric. | 
|  `Transient`  |  `General`  |  Amazon SES received a general bounce. You may be able to successfully send to this recipient in the future.  | 
|  `Transient`  |  `MailboxFull`  |  Amazon SES received a mailbox full bounce. You may be able to successfully send to this recipient in the future.  | 
|  `Transient`  |  `MessageTooLarge`  |  Amazon SES received a message too large bounce. You may be able to successfully send to this recipient if you reduce the size of the message.  | 
|  `Transient`  |  `CustomTimeoutExceeded`  |  Amazon SES was not able to successfully deliver the email within the time specified by the email sender. *(The bounce message will specify the reason for any possible delivery attempt failures within the defined TTL.)*   | 
|  `Transient`  |  `ContentRejected`  |  Amazon SES received a content rejected bounce. You may be able to successfully send to this recipient if you change the content of the message.  | 
|  `Transient`  |  `AttachmentRejected`  |  Amazon SES received an attachment rejected bounce. You may be able to successfully send to this recipient if you remove or change the attachment.  | 

## Complaint object


The JSON object that contains information about a `Complaint` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `complainedRecipients`  |  A list that contains information about recipients that may have submitted the complaint.  | 
|  `timestamp`  |  The date and time, in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*), when the ISP sent the complaint notification.  | 
|  `feedbackId`  |  A unique ID for the complaint.  | 
|  `complaintSubType`  |  The subtype of the complaint, as determined by Amazon SES.  | 

Further, if a feedback report is attached to the complaint, the following fields may be present.


| Field Name | Description | 
| --- | --- | 
|  `userAgent`  |  The value of the `User-Agent` field from the feedback report. This indicates the name and version of the system that generated the report.  | 
|  `complaintFeedbackType`  |  The value of the `Feedback-Type` field from the feedback report received from the ISP. This contains the type of feedback.  | 
|  `arrivalDate`  |  The value of the `Arrival-Date` or `Received-Date` field from the feedback report in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*). This field may be absent in the report (and therefore also absent in the JSON).  | 

### Complained recipients


The `complainedRecipients` field contains a list of recipients that may have submitted the complaint. 

**Important**  
Since most ISPs redact the email address of the recipient who submitted the complaint from their complaint notification, this list contains information about recipients who might have sent the complaint, based on the recipients of the original message and the ISP from which we received the complaint. Amazon SES performs a lookup against the original message to determine this recipient list.

JSON objects in this list contain the following field.


| Field Name | Description | 
| --- | --- | 
|  `emailAddress`  |  The email address of the recipient.  | 

### Complaint types


You may see the following complaint types in the `complaintFeedbackType` field as assigned by the reporting ISP, according to the [Internet Assigned Numbers Authority website](https://www.iana.org/assignments/marf-parameters/marf-parameters.xml#marf-parameters-2):


| Field Name | Description | 
| --- | --- | 
|  `abuse`  |  Indicates unsolicited email or some other kind of email abuse.  | 
|  `auth-failure`  |  Email authentication failure report.  | 
|  `fraud`  |  Indicates some kind of fraud or phishing activity.  | 
|  `not-spam`  |  Indicates that the entity providing the report does not consider the message to be spam. This may be used to correct a message that was incorrectly tagged or categorized as spam.  | 
|  `other`  |  Indicates any other feedback that does not fit into other registered types.  | 
|  `virus`  |  Reports that a virus is found in the originating message.  | 

## Delivery object


The JSON object that contains information about a `Delivery` event will always have the following fields.


| Field Name | Description | 
| --- | --- | 
|  `timestamp`  |  The date and time when Amazon SES delivered the email to the recipient's mail server, in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*).  | 
|  `processingTimeMillis`  |  The time in milliseconds between when Amazon SES accepted the request from the sender to when Amazon SES passed the message to the recipient's mail server.  | 
|  `recipients`  |  A list of intended recipients that the delivery event applies to.  | 
|  `smtpResponse`  |  The SMTP response message of the remote ISP that accepted the email from Amazon SES. This message will vary by email, by receiving mail server, and by receiving ISP.  | 
|  `reportingMTA`  |  The host name of the Amazon SES mail server that sent the mail.  | 
|  `remoteMtaIp`  |  The IP address of the MTA to which Amazon SES delivered the email.  | 

## Send object


The JSON object that contains information about a `send` event is always empty.

## Reject object


The JSON object that contains information about a `Reject` event will always have the following fields.


| Field Name | Description | 
| --- | --- | 
|  `reason`  |  The reason the email was rejected. The only possible value is `Bad content`, which means that Amazon SES detected that the email contained a virus. When a message is rejected, Amazon SES stops processing it, and doesn't attempt to deliver it to the recipient's mail server.  | 

## Open object


The JSON object that contains information about a `Open` event will always contain the following fields.


| Field Name | Description | 
| --- | --- | 
|  `ipAddress`  |  The recipient's IP address.  | 
|  `timestamp`  |  The date and time when the open event occurred in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*).  | 
|  `userAgent`  |  The user agent of the device or email client that the recipient used to open the email.  | 

## Click object


The JSON object that contains information about a `Click` event will always contain the following fields.


| Field Name | Description | 
| --- | --- | 
|  `ipAddress`  |  The recipient's IP address.  | 
|  `timestamp`  |  The date and time when the click event occurred in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*).  | 
|  `userAgent`  |  The user agent of the client that the recipient used to click a link in the email.  | 
|  `link`  |  The URL of the link that the recipient clicked.  | 
|  `linkTags`  |  A list of tags that were added to the link using the `ses:tags` attribute. For more information about adding tags to links in your emails, see [Q5. Can I tag links with unique identifiers?](faqs-metrics.md#sending-metric-faqs-clicks-q5) in the [Amazon SES email sending metrics FAQs](faqs-metrics.md).  | 

## Rendering Failure object
`Rendering Failure` object

The JSON object that contains information about a `Rendering Failure` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `templateName`  |  The name of the template used to send the email.  | 
|  `errorMessage`  |  A message that provides more information about the rendering failure.  | 

## DeliveryDelay object


The JSON object that contains information about a `DeliveryDelay` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `delayType`  |  The type of delay. Possible values are: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ses/latest/dg/event-publishing-retrieving-firehose-contents.html)  | 
|  `delayedRecipients`  |  An object that contains information about the recipient of the email.  | 
|  `expirationTime`  |  The date and time when Amazon SES will stop trying to deliver the message. This value is shown in ISO 8601 format.  | 
|  `reportingMTA`  |  The IP address of the Message Transfer Agent (MTA) that reported the delay.  | 
|  `timestamp`  |  The date and time when the delay occurred, shown in ISO 8601 format.  | 

### Delayed recipients


The `delayedRecipients` object contains the following values.


| Field Name | Description | 
| --- | --- | 
|  `emailAddress`  |  The email address that resulted in the delivery of the message being delayed.  | 
|  `status`  |  The SMTP status code associated with the delivery delay.  | 
|  `diagnosticCode`  |  The diagnostic code provided by the receiving Message Transfer Agent (MTA).   | 

## Subscription object


The JSON object that contains information about a `Subscription` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `contactList`  |  The name of the list the contact is on.  | 
|  `timestamp`  |  The date and time, in ISO8601 format *(YYYY-MM-DDThh:mm:ss.sZ)*, when the ISP sent the subscription notification.  | 
|  `source`  |  The email address that the message was sent from (the envelope MAIL FROM address).  | 
|  `newTopicPreferences`  |  A JSON data-structure (map) which specifies the subscription status of all the topics in the contact list indicating the status after a change (contact subscribed or unsubscribed).  | 
|  `oldTopicPreferences`  |  A JSON data-structure (map) which specifies the subscription status of all the topics in the contact list indicating the status before the change (contact subscribed or unsubscribed).  | 

### New/old topic preferences


The `newTopicPreferences` and `oldTopicPreferences` objects contain the following values.


| Field Name | Description | 
| --- | --- | 
|  `unsubscribeAll`  |  Specifies if the contact unsubscribed from all the topics in the contact list.  | 
|  `topicSubscriptionStatus`  |  Specifies the subscription status of the topic in the `topicName` field indicating whether it is currently subscribed to receive notifications from SES for the specified event type. Possible values are **OptIn** (subscribed) or **OptOut** (unsubscribed) in the `subscriptionStatus` field.  | 
|  `topicDefaultSubscriptionStatus`  |  Specifies the default subscription status of the topic in the `topicName` field determining whether new topics added to the event destination will be subscribed or unsubscribed by default. Possible values are **OptIn** (subscribed by default) or **OptOut** (unsubscribed by default) in the `subscriptionStatus` field.  | 

# Examples of event data that Amazon SES publishes to Firehose
Event record examples

This section provides examples of the types of email sending event record that Amazon SES publishes to Firehose.

**Topics**
+ [

## Bounce record
](#event-publishing-retrieving-firehose-bounce)
+ [

## Complaint record
](#event-publishing-retrieving-firehose-complaint)
+ [

## Delivery record
](#event-publishing-retrieving-firehose-delivery)
+ [

## Send record
](#event-publishing-retrieving-firehose-send)
+ [

## Reject record
](#event-publishing-retrieving-firehose-reject)
+ [

## Open record
](#event-publishing-retrieving-firehose-open)
+ [

## Click record
](#event-publishing-retrieving-firehose-click)
+ [

## Rendering Failure record
](#event-publishing-retrieving-firehose-failure)
+ [

## DeliveryDelay record
](#event-publishing-retrieving-firehose-delayed-delivery)
+ [

## Subscription record
](#event-publishing-retrieving-firehose-subscription)

**Note**  
In the following examples where a `tag` field is utilized, it is using event publishing through a configuration set for which SES supports the publishing of tags for all event types. If using feedback notifications directly on the identity, SES does not publish tags. Read about adding tags when [creating a configuration set](creating-configuration-sets.md) or [modifying a configuration set](managing-configuration-sets.md#console-detail-configuration-sets).

## Bounce record


The following is an example of a `Bounce` event record that Amazon SES publishes to Firehose. 

```
 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 record


The following is an example of a `Complaint` event record that Amazon SES publishes to Firehose. 

```
 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 record


The following is an example of a `Delivery` event record that Amazon SES publishes to Firehose. 

```
 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 record


The following is an example of a `Send` event record that Amazon SES publishes to Firehose. 

```
 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 record


The following is an example of a `Reject` event record that Amazon SES publishes to Firehose. 

```
 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 record


The following is an example of an `Open` event record that Amazon SES publishes to Firehose. 

```
 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 record


The following is an example of a `Click` event record that Amazon SES publishes to Firehose. 

```
 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 record


The following is an example of a `Rendering Failure` event record that Amazon SES publishes to Firehose. 

```
 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 record


The following is an example of a `DeliveryDelay` event record that Amazon SES publishes to Firehose. 

```
 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. }
```

## Subscription record


The following is an example of a `Subscription` event record that Amazon SES publishes to Firehose. 

```
 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. }
```

# Interpreting Amazon SES event data from Amazon SNS
Interpreting event data from Amazon SNS

Amazon SES publishes email sending events to Amazon Simple Notification Service (Amazon SNS) as JSON records. Amazon SNS then delivers notifications to the endpoints that are subscribed to the Amazon SNS topic associated with the event destination. For information about setting up topics and subscriptions in Amazon SNS, see [Getting Started](https://docs.aws.amazon.com/sns/latest/dg/GettingStarted.html) in the *Amazon Simple Notification Service Developer Guide*.

For a description of the record contents and for example records, see the following sections.
+ [Event record contents](event-publishing-retrieving-sns-contents.md)
+ [Event record examples](event-publishing-retrieving-sns-examples.md)

# Contents of event data that Amazon SES publishes to Amazon SNS
Event record contents

Amazon SES publishes email sending event records to Amazon Simple Notification Service in JSON format.

You can find example records for all of these notification types in [Examples of event data that Amazon SES publishes to Amazon SNS](event-publishing-retrieving-sns-examples.md).

**Topics**
+ [

## Top-level JSON object
](#event-publishing-retrieving-sns-contents-top-level-json-object)
+ [

## Mail object
](#event-publishing-retrieving-sns-contents-mail-object)
+ [

## Bounce object
](#event-publishing-retrieving-sns-contents-bounce-object)
+ [

## Complaint object
](#event-publishing-retrieving-sns-contents-complaint-object)
+ [

## Delivery object
](#event-publishing-retrieving-sns-contents-delivery-object)
+ [

## Send object
](#event-publishing-retrieving-sns-contents-send-object)
+ [

## Reject object
](#event-publishing-retrieving-sns-contents-reject-object)
+ [

## Open object
](#event-publishing-retrieving-sns-contents-open-object)
+ [

## Click object
](#event-publishing-retrieving-sns-contents-click-object)
+ [

## Rendering Failure object
](#event-publishing-retrieving-sns-contents-failure-object)
+ [

## DeliveryDelay object
](#event-publishing-retrieving-sns-contents-delivery-delay-object)
+ [

## Subscription object
](#event-publishing-retrieving-sns-contents-subscription-object)

## Top-level JSON object


The top-level JSON object in an email sending event record contains the following fields. The event type determines which other objects are present.


| Field Name | Description | 
| --- | --- | 
|  `eventType`  |  A string that describes the type of event. Possible values: `Bounce`, `Complaint`, `Delivery`, `Send`, `Reject`, `Open`, `Click`, `Rendering Failure`, `DeliveryDelay`, or `Subscription`. If you did not [set up event publishing](monitor-sending-using-event-publishing-setup.md) this field is named `notificationType`.  | 
|  `mail`  |  A JSON object that contains information about the email that produced the event.  | 
|  `bounce`  |  This field is only present if `eventType` is `Bounce`. It contains information about the bounce.  | 
|  `complaint`  |  This field is only present if `eventType` is `Complaint`. It contains information about the complaint.  | 
|  `delivery`  |  This field is only present if `eventType` is `Delivery`. It contains information about the delivery.  | 
|  `send`  |  This field is only present if `eventType` is `Send`.  | 
|  `reject`  |  This field is only present if `eventType` is `Reject`. It contains information about the rejection.  | 
|  `open`  |  This field is only present if `eventType` is `Open`. It contains information about the open event.  | 
|  `click`  |  This field is only present if `eventType` is `Click`. It contains information about the click event.  | 
| `failure` | This field is only present if `eventType` is `Rendering Failure`. It contains information about the rendering failure event. | 
|  `deliveryDelay`  |  This field is only present if `eventType` is `DeliveryDelay`. It contains information about the delayed delivery of an email.  | 
|  `subscription`  |  This field is only present if `eventType` is `Subscription`. It contains information about the subscription preferences.  | 

## Mail object


Each email sending event record contains information about the original email in the `mail` object. The JSON object that contains information about a `mail` object has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `timestamp`  |  The date and time, in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*), when the message was sent.  | 
|  `messageId`  |  A unique ID that Amazon SES assigned to the message. Amazon SES returned this value to you when you sent the message.  This message ID was assigned by Amazon SES. You can find the message ID of the original email in the `headers` and `commonHeaders` fields of the `mail` object.   | 
|  `source`  |  The email address that the message was sent from (the envelope MAIL FROM address).  | 
|  `sourceArn`  |  The Amazon Resource Name (ARN) of the identity that was used to send the email. In the case of sending authorization, the `sourceArn` is the ARN of the identity that the identity owner authorized the delegate sender to use to send the email. For more information about sending authorization, see [Email authentication methodsUsing sending authorization](sending-authorization.md).  | 
|  `sendingAccountId`  |  The AWS account ID of the account that was used to send the email. In the case of sending authorization, the `sendingAccountId` is the delegate sender's account ID.  | 
|  `destination`  |  A list of email addresses that were recipients of the original mail.  | 
|  `headersTruncated`  |  A string that specifies whether the headers are truncated in the notification, which occurs if the headers are larger than 10 KB. Possible values are `true` and `false`.  | 
|  `headers`  |  A list of the email's original headers. Each header in the list has a `name` field and a `value` field.  Any message ID within the `headers` field is from the original message that you passed to Amazon SES. The message ID that Amazon SES subsequently assigned to the message is in the `messageId` field of the `mail` object.   | 
|  `commonHeaders`  |  A mapping of the email's original, commonly used headers.  Any message ID within the `commonHeaders` field is the message ID that Amazon SES subsequently assigned to the message in the `messageId` field of the `mail` object.   | 
|  `tags`  |  A list of tags associated with the email.  | 

## Bounce object


The JSON object that contains information about a `Bounce` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `bounceType`  |  The type of bounce, as determined by Amazon SES.  | 
|  `bounceSubType`  |  The subtype of the bounce, as determined by Amazon SES.  | 
|  `bouncedRecipients`  |  A list that contains information about the recipients of the original mail that bounced.  | 
|  `timestamp`  |  The date and time, in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*), when the ISP sent the bounce notification.  | 
|  `feedbackId`  |  A unique ID for the bounce.  | 
|  `reportingMTA`  |  The value of the `Reporting-MTA` field from the DSN. This is the value of the Message Transfer Authority (MTA) that attempted to perform the delivery, relay, or gateway operation described in the DSN.  This field only appears if a delivery status notification (DSN) was attached to the bounce.   | 

### Bounced recipients


A bounce event may pertain to a single recipient or to multiple recipients. The `bouncedRecipients` field holds a list of objects—one object per recipient whose email address produced a bounce—and contains the following field.


| Field Name | Description | 
| --- | --- | 
|  `emailAddress`  |  The email address of the recipient. If a DSN is available, this is the value of the `Final-Recipient` field from the DSN.  | 

Optionally, if a DSN is attached to the bounce, the following fields may also be present.


| Field Name | Description | 
| --- | --- | 
|  `action`  |  The value of the `Action` field from the DSN. This indicates the action performed by the reporting MTA as a result of its attempt to deliver the message to this recipient.  | 
|  `status`  |  The value of the `Status` field from the DSN. This is the per-recipient transport-independent status code that indicates the delivery status of the message.  | 
|  `diagnosticCode`  |  The status code issued by the reporting MTA. This is the value of the `Diagnostic-Code` field from the DSN. This field may be absent in the DSN (and therefore also absent in the JSON).  | 

### Bounce types


Each bounce event is of one of the types shown in the following table.

The event publishing system only publishes hard bounces and soft bounces that are no longer retried by Amazon SES. When you receive bounces marked `Permanent`, you should remove the corresponding email addresses from your mailing list; you will not be able to send to them in the future. `Transient` bounces are sent to you when a message has soft bounced several times, and Amazon SES has stopped trying to re-deliver it. You may be able to successfully resend to an address that initially resulted in a `Transient` bounce in the future.


| bounceType | bounceSubType | Description | 
| --- | --- | --- | 
|  `Undetermined`  |  `Undetermined`  |  Amazon SES was unable to determine a specific bounce reason.  | 
|  `Permanent`  |  `General`  |  Amazon SES received a general hard bounce. If you receive this type of bounce, you should remove the recipient's email address from your mailing list.  | 
|  `Permanent`  |  `NoEmail`  |  Amazon SES received a permanent hard bounce because the target email address does not exist. If you receive this type of bounce, you should remove the recipient's email address from your mailing list.  | 
|  `Permanent`  |  `Suppressed`  |  Amazon SES has suppressed sending to this address because it has a recent history of bouncing as an invalid address. To override the global suppression list, see [Using the Amazon SES account-level suppression list](sending-email-suppression-list.md).   | 
| Permanent | OnAccountSuppressionList | Amazon SES has suppressed sending to this address because it is on the [account-level suppression list](sending-email-suppression-list.md). This does not count toward your bounce rate metric. | 
|  `Transient`  |  `General`  |  Amazon SES received a general bounce. You may be able to successfully send to this recipient in the future.  | 
|  `Transient`  |  `MailboxFull`  |  Amazon SES received a mailbox full bounce. You may be able to successfully send to this recipient in the future.  | 
|  `Transient`  |  `MessageTooLarge`  |  Amazon SES received a message too large bounce. You may be able to successfully send to this recipient if you reduce the size of the message.  | 
|  `Transient`  |  `CustomTimeoutExceeded`  |  Amazon SES was not able to successfully deliver the email within the time specified by the email sender. *(The bounce message will specify the reason for any possible delivery attempt failures within the defined TTL.)*   | 
|  `Transient`  |  `ContentRejected`  |  Amazon SES received a content rejected bounce. You may be able to successfully send to this recipient if you change the content of the message.  | 
|  `Transient`  |  `AttachmentRejected`  |  Amazon SES received an attachment rejected bounce. You may be able to successfully send to this recipient if you remove or change the attachment.  | 

## Complaint object


The JSON object that contains information about a `Complaint` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `complainedRecipients`  |  A list that contains information about recipients that may have submitted the complaint.  | 
|  `timestamp`  |  The date and time, in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*), when the ISP sent the complaint notification.  | 
|  `feedbackId`  |  A unique ID for the complaint.  | 
|  `complaintSubType`  |  The subtype of the complaint, as determined by Amazon SES.  | 

Further, if a feedback report is attached to the complaint, the following fields may be present.


| Field Name | Description | 
| --- | --- | 
|  `userAgent`  |  The value of the `User-Agent` field from the feedback report. This indicates the name and version of the system that generated the report.  | 
|  `complaintFeedbackType`  |  The value of the `Feedback-Type` field from the feedback report received from the ISP. This contains the type of feedback.  | 
|  `arrivalDate`  |  The value of the `Arrival-Date` or `Received-Date` field from the feedback report in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*). This field may be absent in the report (and therefore also absent in the JSON).  | 

### Complained recipients


The `complainedRecipients` field contains a list of recipients that may have submitted the complaint. 

**Important**  
Most ISPs redact the email addresses of recipients who submit complaints. For this reason, the `complainedRecipients` field includes a list of everyone who was sent the email whose address is on the domain that issued the complaint notification.

JSON objects in this list contain the following field.


| Field Name | Description | 
| --- | --- | 
|  `emailAddress`  |  The email address of the recipient.  | 

### Complaint types


You may see the following complaint types in the `complaintFeedbackType` field as assigned by the reporting ISP, according to the [Internet Assigned Numbers Authority website](https://www.iana.org/assignments/marf-parameters/marf-parameters.xml#marf-parameters-2):


| Field Name | Description | 
| --- | --- | 
|  `abuse`  |  Indicates unsolicited email or some other kind of email abuse.  | 
|  `auth-failure`  |  Email authentication failure report.  | 
|  `fraud`  |  Indicates some kind of fraud or phishing activity.  | 
|  `not-spam`  |  Indicates that the entity providing the report does not consider the message to be spam. This may be used to correct a message that was incorrectly tagged or categorized as spam.  | 
|  `other`  |  Indicates any other feedback that does not fit into other registered types.  | 
|  `virus`  |  Reports that a virus is found in the originating message.  | 

### Complaint subtypes


The value of the `complaintSubType` field can either be null or `OnAccountSuppressionList`. If the value is `OnAccountSuppressionList`, Amazon SES accepted the message, but didn't attempt to send it because it was on the [account-level suppression list](sending-email-suppression-list.md).

## Delivery object


The JSON object that contains information about a `Delivery` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `timestamp`  |  The date and time when Amazon SES delivered the email to the recipient's mail server, in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*).  | 
|  `processingTimeMillis`  |  The time in milliseconds between when Amazon SES accepted the request from the sender to when Amazon SES passed the message to the recipient's mail server.  | 
|  `recipients`  |  A list of intended recipients that the delivery event applies to.  | 
|  `smtpResponse`  |  The SMTP response message of the remote ISP that accepted the email from Amazon SES. This message will vary by email, by receiving mail server, and by receiving ISP.  | 
|  `reportingMTA`  |  The host name of the Amazon SES mail server that sent the mail.  | 
|  `remoteMtaIp`  |  The IP address of the MTA to which Amazon SES delivered the email.  | 

## Send object


The JSON object that contains information about a `send` event is always empty.

## Reject object


The JSON object that contains information about a `Reject` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `reason`  |  The reason the email was rejected. The only possible value is `Bad content`, which means that Amazon SES detected that the email contained a virus. When a message is rejected, Amazon SES stops processing it, and doesn't attempt to deliver it to the recipient's mail server.  | 

## Open object


The JSON object that contains information about a `Open` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `ipAddress`  |  The recipient's IP address.  | 
|  `timestamp`  |  The date and time when the open event occurred in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*).  | 
|  `userAgent`  |  The user agent of the device or email client that the recipient used to open the email.  | 

## Click object


The JSON object that contains information about a `Click` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `ipAddress`  |  The recipient's IP address.  | 
|  `timestamp`  |  The date and time when the click event occurred in ISO8601 format (*YYYY-MM-DDThh:mm:ss.sZ*).  | 
|  `userAgent`  |  The user agent of the client that the recipient used to click a link in the email.  | 
|  `link`  |  The URL of the link that the recipient clicked.  | 
|  `linkTags`  |  A list of tags that were added to the link using the `ses:tags` attribute. For more information about adding tags to links in your emails, see [Q5. Can I tag links with unique identifiers?](faqs-metrics.md#sending-metric-faqs-clicks-q5) in the [Amazon SES email sending metrics FAQs](faqs-metrics.md).  | 

## Rendering Failure object


The JSON object that contains information about a `Rendering Failure` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `templateName`  |  The name of the template used to send the email.  | 
|  `errorMessage`  |  A message that provides more information about the rendering failure.  | 

## DeliveryDelay object
`DeliveryDelay` object

The JSON object that contains information about a `DeliveryDelay` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `delayType`  |  The type of delay. Possible values are: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ses/latest/dg/event-publishing-retrieving-sns-contents.html)  | 
|  `delayedRecipients`  |  An object that contains information about the recipient of the email.  | 
|  `expirationTime`  |  The date and time when Amazon SES will stop trying to deliver the message. This value is shown in ISO 8601 format.  | 
|  `reportingMTA`  |  The IP address of the Message Transfer Agent (MTA) that reported the delay.  | 
|  `timestamp`  |  The date and time when the delay occurred, shown in ISO 8601 format.  | 

### Delayed recipients


The `delayedRecipients` object contains the following values.


| Field Name | Description | 
| --- | --- | 
|  `emailAddress`  |  The email address that resulted in the delivery of the message being delayed.  | 
|  `status`  |  The SMTP status code associated with the delivery delay.  | 
|  `diagnosticCode`  |  The diagnostic code provided by the receiving Message Transfer Agent (MTA).   | 

## Subscription object


The JSON object that contains information about a `Subscription` event has the following fields.


| Field Name | Description | 
| --- | --- | 
|  `contactList`  |  The name of the list the contact is on.  | 
|  `timestamp`  |  The date and time, in ISO8601 format *(YYYY-MM-DDThh:mm:ss.sZ)*, when the ISP sent the subscription notification.  | 
|  `source`  |  The email address that the message was sent from (the envelope MAIL FROM address).  | 
|  `newTopicPreferences`  |  A JSON data-structure (map) which specifies the subscription status of all the topics in the contact list indicating the status after a change (contact subscribed or unsubscribed).  | 
|  `oldTopicPreferences`  |  A JSON data-structure (map) which specifies the subscription status of all the topics in the contact list indicating the status before the change (contact subscribed or unsubscribed).  | 

### New/old topic preferences


The `newTopicPreferences` and `oldTopicPreferences` objects contain the following values.


| Field Name | Description | 
| --- | --- | 
|  `unsubscribeAll`  |  Specifies if the contact unsubscribed from all the topics in the contact list.  | 
|  `topicSubscriptionStatus`  |  Specifies the subscription status of the topic in the `topicName` field indicating whether it is currently subscribed to receive notifications from SES for the specified event type. Possible values are **OptIn** (subscribed) or **OptOut** (unsubscribed) in the `subscriptionStatus` field.  | 
|  `topicDefaultSubscriptionStatus`  |  Specifies the default subscription status of the topic in the `topicName` field determining whether new topics added to the event destination will be subscribed or unsubscribed by default. Possible values are **OptIn** (subscribed by default) or **OptOut** (unsubscribed by default) in the `subscriptionStatus` field.  | 

# Examples of event data that Amazon SES publishes to Amazon SNS
Event record examples

This section provides examples of the types of email sending event records that Amazon SES publishes to Amazon SNS.

**Topics**
+ [

## Bounce record
](#event-publishing-retrieving-sns-bounce)
+ [

## Complaint record
](#event-publishing-retrieving-sns-complaint)
+ [

## Delivery record
](#event-publishing-retrieving-sns-delivery)
+ [

## Send record
](#event-publishing-retrieving-sns-send)
+ [

## Reject record
](#event-publishing-retrieving-sns-reject)
+ [

## Open record
](#event-publishing-retrieving-sns-open)
+ [

## Click record
](#event-publishing-retrieving-sns-click)
+ [

## Rendering Failure record
](#event-publishing-retrieving-sns-failure)
+ [

## DeliveryDelay record
](#event-publishing-retrieving-sns-delayed-delivery)
+ [

## Subscription record
](#event-publishing-retrieving-sns-subscription)

**Note**  
In the following examples where a `tag` field is utilized, it is using event publishing through a configuration set for which SES supports the publishing of tags for all event types. If using feedback notifications directly on the identity, SES does not publish tags. Read about adding tags when [creating a configuration set](creating-configuration-sets.md) or [modifying a configuration set](managing-configuration-sets.md#console-detail-configuration-sets).

## Bounce record


The following is an example of a `Bounce` event record that Amazon SES publishes to Amazon SNS. 

```
 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 record


The following is an example of a `Complaint` event record that Amazon SES publishes to Amazon SNS. 

```
 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 record


The following is an example of a `Delivery` event record that Amazon SES publishes to Amazon SNS. 

```
 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 record


The following is an example of a `Send` event record that Amazon SES publishes to Amazon SNS. Some fields are not always present. For example, with a templated email, the subject is rendered later and included in subsequent events.

```
 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 record


The following is an example of a `Reject` event record that Amazon SES publishes to Amazon SNS. 

```
 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 record


The following is an example of an `Open` event record that Amazon SES publishes to Amazon SNS. 

```
 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 record


The following is an example of a `Click` event record that Amazon SES publishes to Amazon SNS. 

```
 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 record


The following is an example of a `Rendering Failure` event record that Amazon SES publishes to Amazon SNS. 

```
 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 record


The following is an example of a `DeliveryDelay` event record that Amazon SES publishes to Amazon SNS. 

```
 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. }
```

## Subscription record


The following is an example of a `Subscription` event record that Amazon SES publishes to Firehose. 

```
 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. }
```