How to Create Amazon SES Email Identities and Contact Lists Using the AWS CLI
by Kurt Feeley

Photo by Liam Truong on Unsplash
This article is part of a series to introduce developers to Amazon Simple Email Service. Check out all the articles.
Introduction to Amazon Simple Email Service – SES
Using the CLI to Set Up Amazon SES Email Identities and Contact Lists.
Using Amazon Simple Email Service (SES) to Send Single Emails
Using Amazon Simple Email Service (SES) to Send Bulk, Templated Emails
Amazon SES Email Identities and Contacts
In this article, we’ll go over how to use the Amazon SES v2 CLI to configure email identities and contact lists.
Email Identities
Amazon SES uses email identities to verify email addresses and domains. Amazon SES confirms ownership of email addresses and domains and authorizes sending permissions to help prevent email spoofing. Using domain level email identities is recommended for production solutions as it simplifies email management. However, for simplicity, we’ll demonstrate email level identity verification.
We’ll need to first create an email identity. For the purpose of this article, an email identity is an email address that we can use to send email. Before we can use an identity to send email, we must first verify it. Running the following command at the CLI will create an email identity, but will also start the process of verifying an email identity.
$ aws sesv2 create-email-identity --email-identity example.name@example.email
Now we need to verify the email identity. When we ran the previous command, an email was sent to the email address provided.
We now need to open the email and click on the verification link. Once verified, we can start to send emails via Amazon SES using that email address. By verifying an email identity, we prove that we are the owner of the identity, and that we have given Amazon SES permission to send emails using the email identity.
Now that the email identity has been created and verified, let’s run the following command to get the details of the identity.
$ aws sesv2 get-email-identity --email-identity example.name@example.email
You should see a JSON structure that contains the following attributes along with some others:
{
"IdentityType": "EMAIL_ADDRESS",
"VerifiedForSendingStatus": true,
"VerificationStatus": "SUCCESS",
}
Contact Lists
Amazon SES contact lists are collections of user email addresses. We can use contact lists to categorize contacts and manage users opting in and out of email subscriptions.
First, we’ll create a contact list using the Amazon SES v2 CLI.
$ aws sesv2 create-contact-list --contact-list-name "newsletter-subscribers"
With the contact list created, let’s add a few emails.
$ aws sesv2 create-contact \
--contact-list-name "newsletter-subscribers" \
--email-address example1.name@example.email
$ aws sesv2 create-contact \
--contact-list-name "newsletter-subscribers" \
--email-address example2.name@example.email
$ aws sesv2 create-contact \
--contact-list-name "newsletter-subscribers" \
--email-address example3.name@example.email
Finally, run one last command to verify that all contacts were added.
$ aws sesv2 list-contacts --contact-list-name "newsletter-subscribers"
On completion of the command, the output should show something like this:
{
"Contacts": [
{
"EmailAddress": "example1.name@example.email",
"UnsubscribeAll": false,
"LastUpdatedTimestamp": "2025-03-06T15:46:57.882000-05:00"
},
{
"EmailAddress": "example2.name@example.email",
"UnsubscribeAll": false,
"LastUpdatedTimestamp": "2025-03-07T14:17:05.957000-05:00"
},
{
"EmailAddress": "example3.name@example.email",
"UnsubscribeAll": false,
"LastUpdatedTimestamp": "2025-03-07T18:22:44.676000-05:00"
}
]
}
What’s Next?
Move to the next article in this series to learn how to build a .NET app that sends a single email using Amazon Simple Email Service (SES).
Summary
We have concluded this article where you have learned how to:
- Create Amazon SES Email Identities using the AWS CLI.
- Validate Amazon SES Email Identities.
- Create Amazon SES Contact Lists using the AWS CLI.
- Add Contacts to an Amazon SES Contact List.
- View Contacts within an Amazon SES Contact List using the AWS CLI.
Want to know more about the tech in this article? Check out these resources: