

# Step 2: Add an event destination
<a name="event-publishing-add-event-destination"></a>

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
<a name="event-publishing-add-event-destination-cloudwatch"></a>

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
<a name="event-publishing-add-event-destination-cloudwatch-add"></a>

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
<a name="event-publishing-add-event-destination-cloudwatch-dimensions"></a>

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
<a name="event-publishing-add-event-destination-firehose"></a>

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
<a name="event-publishing-add-event-destination-firehose-role"></a>

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
<a name="event-publishing-add-event-destination-firehose-role-permission"></a>

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
<a name="event-publishing-add-event-destination-firehose-role-trust"></a>

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
<a name="event-publishing-add-event-destination-eventbridge"></a>

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
<a name="event-publishing-add-event-destination-pinpoint"></a>

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
<a name="event-publishing-add-event-destination-sns"></a>

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**.