Skip to content
GitHubXDiscordRSS

EmailChannel

Learn how to create, update, and manage AWS Pinpoint EmailChannels using Alchemy Cloud Control.

The EmailChannel resource lets you manage AWS Pinpoint EmailChannels for sending emails to users through your applications.

Create a basic EmailChannel with the required properties.

import AWS from "alchemy/aws/control";
const emailChannel = await AWS.Pinpoint.EmailChannel("myEmailChannel", {
ApplicationId: "12345678-abcd-1234-abcd-1234567890ab",
FromAddress: "noreply@example.com",
Identity: "identity@example.com",
Enabled: true
});

Configure an EmailChannel with additional properties such as a configuration set and orchestration sending role ARN.

const advancedEmailChannel = await AWS.Pinpoint.EmailChannel("advancedEmailChannel", {
ApplicationId: "12345678-abcd-1234-abcd-1234567890ab",
FromAddress: "noreply@example.com",
Identity: "identity@example.com",
ConfigurationSet: "myConfigurationSet",
OrchestrationSendingRoleArn: "arn:aws:iam::123456789012:role/myOrchestrationRole",
Enabled: true
});

If you want to adopt an existing EmailChannel instead of failing, use the adopt property.

const adoptEmailChannel = await AWS.Pinpoint.EmailChannel("adoptEmailChannel", {
ApplicationId: "12345678-abcd-1234-abcd-1234567890ab",
FromAddress: "noreply@example.com",
Identity: "identity@example.com",
adopt: true
});

To temporarily disable an EmailChannel while retaining its configuration, set the Enabled property to false.

const disabledEmailChannel = await AWS.Pinpoint.EmailChannel("disabledEmailChannel", {
ApplicationId: "12345678-abcd-1234-abcd-1234567890ab",
FromAddress: "noreply@example.com",
Identity: "identity@example.com",
Enabled: false
});