Skip to content
GitHubXDiscord

ContactList

The ContactList resource allows you to manage AWS SES ContactLists for organizing email contacts into lists for your email campaigns.

Create a basic contact list with a name and description.

import AWS from "alchemy/aws/control";
const contactList = await AWS.SES.ContactList("myContactList", {
ContactListName: "Marketing Contacts",
Description: "A list of contacts for the marketing team."
});

Add topics and tags to your contact list for better categorization and management.

const advancedContactList = await AWS.SES.ContactList("advancedContactList", {
ContactListName: "Sales Contacts",
Description: "A list of contacts for the sales team.",
Topics: [
{
TopicName: "Product Updates",
DefaultSubscriptionStatus: "OPT_IN"
},
{
TopicName: "Promotions",
DefaultSubscriptionStatus: "OPT_IN"
}
],
Tags: [
{
Key: "Department",
Value: "Sales"
},
{
Key: "Region",
Value: "North America"
}
]
});

Adopt an existing contact list instead of failing if it already exists.

const adoptedContactList = await AWS.SES.ContactList("existingContactList", {
ContactListName: "Customer Feedback",
Description: "A list of contacts providing feedback.",
adopt: true
});

Update the description of an existing contact list.

const updatedContactList = await AWS.SES.ContactList("updateContactList", {
ContactListName: "Marketing Contacts",
Description: "Updated list of contacts for the marketing team."
});