Create and manage Address Lists
Create an empty Address List, then add email addresses, domains, or supported wildcard patterns. You can add one member at a time or import members from a CSV or JSON file.
Permissions for address lists
The principal that manages an Address List needs permission for the API operations that it uses. In the following IAM policy, replace the AWS Region and account ID with your own values. The policy allows the principal to manage address lists and their members in one account and Region.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ManageAddressLists", "Effect": "Allow", "Action": [ "ses:CreateAddressList", "ses:GetAddressList", "ses:DeleteAddressList", "ses:GetMemberOfAddressList", "ses:ListMembersOfAddressList", "ses:RegisterMemberToAddressList", "ses:DeregisterMemberFromAddressList", "ses:CreateAddressListImportJob", "ses:GetAddressListImportJob", "ses:ListAddressListImportJobs", "ses:StartAddressListImportJob", "ses:StopAddressListImportJob", "ses:TagResource", "ses:UntagResource", "ses:ListTagsForResource" ], "Resource": "arn:aws-eusc:ses:eusc-de-east-1:123456789012:mailmanager-address-list/*" }, { "Sid": "ListAddressLists", "Effect": "Allow", "Action": "ses:ListAddressLists", "Resource": "*" } ] }
Address-list operations support resource-level permissions on the
mailmanager-address-list resource type. You can use
aws:RequestTag, aws:ResourceTag, and
aws:TagKeys conditions to control access by tag.
Creating and populating an Address List
To create and populate an Address List in the SES console
Sign in to the AWS Management Console and open the Amazon SES console at https://eusc-de-east-1.console.amazonaws-eusc.eu/ses/
. -
In the navigation pane, under Mail Manager, choose Address Lists.
-
Choose Create address list.
-
Enter a unique name for the list.
-
Choose Manual entry to enter members directly, or choose Bulk upload to upload a CSV or JSON file.
-
Choose Create address list.
To create an empty Address List with the AWS CLI, replace the AWS Region and list name with your own values.
PROMPT> aws mailmanager create-address-list \ --regioneusc-de-east-1\ --address-list-namevalid-inbound-recipients
The command returns an AddressListId. The following examples use
al-0123456789abcdef.
Choosing address-list member formats
The following table shows supported member formats and their matching boundaries.
| Member | Matches | Does not match |
|---|---|---|
mary_major@example.com |
The exact mailbox | Other mailboxes or subaddress extensions |
example.com |
Any mailbox at the exact domain | Mailboxes at subdomains such as
user@dept.example.com |
*@example.com |
Any mailbox at the exact domain | Mailboxes at subdomains |
orders*@example.com |
orders@example.com,
orders+tag@example.com, and
orders-archive@example.com |
A local part that does not start with
orders |
*.example.com |
Any mailbox at a subdomain such as
user@dept.example.com |
A mailbox at the parent domain, such as
user@example.com |
orders@*.example.com |
The orders mailbox at a subdomain |
Other local parts or the parent domain |
A member can contain one asterisk (*). For a local-part prefix such
as orders*@example.com, the prefix before the asterisk can contain up
to 19 characters. For *.example.com or
orders@*.example.com, the suffix after *. can contain
2–9 domain labels.
orders*@example.com matches every local part that starts with
orders. It matches orders+tag@example.com, but it
also matches orders-archive@example.com and
ordersbackup@example.com. Use an exact address when those
additional matches are not intended.
Adding and removing individual members
In the following commands, replace the AWS Region, Address List ID, and member with your own values.
PROMPT> aws mailmanager register-member-to-address-list \ --regioneusc-de-east-1\ --address-list-idal-0123456789abcdef\ --addressorders@example.com
PROMPT> aws mailmanager deregister-member-from-address-list \ --regioneusc-de-east-1\ --address-list-idal-0123456789abcdef\ --addressorders@example.com
Importing members in bulk
A CSV file requires an address header.
address orders@example.com *@partner.example *.customer.example
A JSON file requires an items list containing an
address for each member.
{ "items": [ {"address": "orders@example.com"}, {"address": "*@partner.example"}, {"address": "*.customer.example"} ] }
In the following commands, replace the AWS Region, Address List ID, job name, input path, pre-signed URL, and job ID with your own values.
PROMPT> aws mailmanager create-address-list-import-job \ --regioneusc-de-east-1\ --address-list-idal-0123456789abcdef\ --namenovember-domain-import\ --import-data-format ImportDataType=CSV
The command returns a JobId and PreSignedUrl. Upload the
input file to that URL.
PROMPT> curl --request PUT \ --upload-file./approved-domains.csv\ 'pre-signed-url'
PROMPT> aws mailmanager start-address-list-import-job \ --regioneusc-de-east-1\ --job-idjob-0123456789abcdef
Run the following command until Status is COMPLETED,
FAILED, or STOPPED.
PROMPT> aws mailmanager get-address-list-import-job \ --regioneusc-de-east-1\ --job-idjob-0123456789abcdef\ --query '{Status:Status,Imported:ImportedItemsCount,Failed:FailedItemsCount,Error:Error}'
The pre-signed upload URL expires after 15 minutes. Treat the URL as sensitive because it authorizes an upload. The import file can be up to 10 MiB. Only one import job can process a given Address List at a time.
A completed job can report both imported and failed items. Review
FailedItemsCount and Error before using the list in a
traffic policy or rule.
Managing Address Lists
Updating an Address List
Add and remove members with the procedures in Adding and removing individual members. To add or remove tags in the SES console, open the list and choose Manage tags.
Viewing Address List details and members
In the following commands, replace the AWS Region and Address List ID with your own values.
PROMPT> aws mailmanager get-address-list \ --regioneusc-de-east-1\ --address-list-idal-0123456789abcdef
PROMPT> aws mailmanager list-members-of-address-list \ --regioneusc-de-east-1\ --address-list-idal-0123456789abcdef\ --filter AddressPrefix=orders
Deleting an Address List
You cannot delete an Address List while a rule condition, an
Unless condition, or a traffic-policy condition references it.
Remove every reference before deleting the list.
In the following command, replace the AWS Region and Address List ID with your own values.
PROMPT> aws mailmanager delete-address-list \ --regioneusc-de-east-1\ --address-list-idal-0123456789abcdef
Address-list constraints
-
A member can contain 3–320 characters.
-
An address-list membership condition can reference one Address List.
-
Nested Address Lists are not supported.