Resource: aws_ses_event_destination

Provides an SES event destination

Example Usage

CloudWatch Destination

resource "aws_ses_event_destination" "cloudwatch" {
  name                   = "event-destination-cloudwatch"
  configuration_set_name = aws_ses_configuration_set.example.name
  enabled                = true
  matching_types         = ["bounce", "send"]

  cloudwatch_destination {
    default_value  = "default"
    dimension_name = "dimension"
    value_source   = "emailHeader"
  }
}

Kinesis Destination

resource "aws_ses_event_destination" "kinesis" {
  name                   = "event-destination-kinesis"
  configuration_set_name = aws_ses_configuration_set.example.name
  enabled                = true
  matching_types         = ["bounce", "send"]

  kinesis_destination {
    stream_arn = aws_kinesis_firehose_delivery_stream.example.arn
    role_arn   = aws_iam_role.example.arn
  }
}

SNS Destination

resource "aws_ses_event_destination" "sns" {
  name                   = "event-destination-sns"
  configuration_set_name = aws_ses_configuration_set.example.name
  enabled                = true
  matching_types         = ["bounce", "send"]

  sns_destination {
    topic_arn = aws_sns_topic.example.arn
  }
}

Argument Reference

This resource supports the following arguments:

cloudwatch_destination Argument Reference

kinesis_destination Argument Reference

sns_destination Argument Reference

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import SES event destinations using configuration_set_name together with the event destination's name. For example:

import {
  to = aws_ses_event_destination.sns
  id = "some-configuration-set-test/event-destination-sns"
}

Using terraform import, import SES event destinations using configuration_set_name together with the event destination's name. For example:

% terraform import aws_ses_event_destination.sns some-configuration-set-test/event-destination-sns