Skip to content

ConfigurationSet

Source: src/AWS/SES/ConfigurationSet.ts

An Amazon SES v2 configuration set — a named group of sending options (TLS policy, reputation metrics, suppression overrides) that you apply to outbound email, either per-message or as an identity’s default.

Attach event destinations with SES.ConfigurationSetEventDestination to stream send/delivery/bounce/complaint events to SNS, EventBridge, or CloudWatch.

Basic Configuration Set

import * as SES from "alchemy/AWS/SES";
const configSet = yield* SES.ConfigurationSet("Default", {});

Require TLS and Publish Reputation Metrics

const configSet = yield* SES.ConfigurationSet("Strict", {
tlsPolicy: "REQUIRE",
reputationMetricsEnabled: true,
});

Suppress Bounces and Complaints

const configSet = yield* SES.ConfigurationSet("Suppressing", {
suppressedReasons: ["BOUNCE", "COMPLAINT"],
});
const topic = yield* SNS.Topic("EmailEvents", {});
const destination = yield* SES.ConfigurationSetEventDestination("ToSns", {
configurationSetName: configSet.configurationSetName,
matchingEventTypes: ["SEND", "DELIVERY", "BOUNCE", "COMPLAINT"],
snsDestination: { topicArn: topic.topicArn },
});