Skip to content
GitHubXDiscordRSS

EmailIdentity

Learn how to create, update, and manage AWS SES EmailIdentitys using Alchemy Cloud Control.

The EmailIdentity resource lets you manage AWS SES EmailIdentitys for sending email using the Amazon Simple Email Service (SES).

Create a basic EmailIdentity with required properties and common optional settings.

import AWS from "alchemy/aws/control";
const emailIdentity = await AWS.SES.EmailIdentity("myEmailIdentity", {
EmailIdentity: "user@example.com",
FeedbackAttributes: {
ForwardingEnabled: true
},
DkimSigningAttributes: {
SigningEnabled: true
}
});

Configure an EmailIdentity with additional options for DKIM attributes and mail forwarding.

const advancedEmailIdentity = await AWS.SES.EmailIdentity("advancedEmailIdentity", {
EmailIdentity: "admin@example.com",
DkimAttributes: {
DkimEnabled: true,
DkimTokens: ["token1", "token2", "token3"]
},
MailFromAttributes: {
MailFromDomain: "mail.example.com",
BehaviorOnMxFailure: "UseDefaultValue"
}
});

If an EmailIdentity already exists, you can adopt it instead of failing.

const existingEmailIdentity = await AWS.SES.EmailIdentity("existingEmailIdentity", {
EmailIdentity: "contact@example.com",
adopt: true
});