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).
Minimal Example
Section titled “Minimal Example”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 }});
Advanced Configuration
Section titled “Advanced Configuration”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" }});
Adoption of Existing Email Identity
Section titled “Adoption of Existing Email Identity”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});