Skip to content

Resource: awsSesEventDestination

Provides an SES event destination

Example Usage

CloudWatch Destination

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.sesEventDestination.SesEventDestination(this, "cloudwatch", {
  cloudwatchDestination: [
    {
      defaultValue: "default",
      dimensionName: "dimension",
      valueSource: "emailHeader",
    },
  ],
  configurationSetName: "${aws_ses_configuration_set.example.name}",
  enabled: true,
  matchingTypes: ["bounce", "send"],
  name: "event-destination-cloudwatch",
});

Kinesis Destination

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.sesEventDestination.SesEventDestination(this, "kinesis", {
  configurationSetName: "${aws_ses_configuration_set.example.name}",
  enabled: true,
  kinesisDestination: {
    roleArn: "${aws_iam_role.example.arn}",
    streamArn: "${aws_kinesis_firehose_delivery_stream.example.arn}",
  },
  matchingTypes: ["bounce", "send"],
  name: "event-destination-kinesis",
});

SNS Destination

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.sesEventDestination.SesEventDestination(this, "sns", {
  configurationSetName: "${aws_ses_configuration_set.example.name}",
  enabled: true,
  matchingTypes: ["bounce", "send"],
  name: "event-destination-sns",
  snsDestination: {
    topicArn: "${aws_sns_topic.example.arn}",
  },
});

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the event destination
  • configurationSetName - (Required) The name of the configuration set
  • enabled - (Optional) If true, the event destination will be enabled
  • matchingTypes - (Required) A list of matching types. May be any of "send", "reject", "bounce", "complaint", "delivery", "open", "click", or "renderingFailure".
  • cloudwatchDestination - (Optional) CloudWatch destination for the events
  • kinesisDestination - (Optional) Send the events to a kinesis firehose destination
  • snsDestination - (Optional) Send the events to an SNS Topic destination

\~> NOTE: You can specify "cloudwatchDestination" or "kinesisDestination" but not both

cloudwatch_destination Argument Reference

  • defaultValue - (Required) The default value for the event
  • dimensionName - (Required) The name for the dimension
  • valueSource - (Required) The source for the value. May be any of "messageTag", "emailHeader" or "linkTag".

kinesis_destination Argument Reference

  • streamArn - (Required) The ARN of the Kinesis Stream
  • roleArn - (Required) The ARN of the role that has permissions to access the Kinesis Stream

sns_destination Argument Reference

  • topicArn - (Required) The ARN of the SNS topic

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The SES event destination name.
  • arn - The SES event destination ARN.

Import

SES event destinations can be imported using configurationSetName together with the event destination's name, e.g.,

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