AWS SES Suppression List

You have an application which sends a sign in notification everytime a user signs in. Now on lower environments, we use dummy / junk emails for signing up.

One day, the QA team decides to conduct a load test and send 3000 requests to generate random users and then log in to those 3000 users.

As a result, 6000 emails are sent from your SES to non-existent email addresses. The next day you see your bounce rate has reached 6%.

That’s bad, very bad!

Situations like these seem inescapable. You need to do load testing and you cannot definitely create so many real email IDs to use in your load tests.

For such situations, we can use suppression list.

It is a feature of AWS SES which blocks sending emails to the addresses for the current account and region.

How does it work?

Simple, you tell it to add every email address which gives a hard bounce or a complaint or both. It will then add these addresses to suppression list.

Any email which you send out to an addresss in the suppression list, is accepted by SES but never sent.

These mails are not counted in your bounce rate, but are considered in your sending limit (because you actually sent it)

Once an email address ends up in suppression list, it will remain there until it is not manually removed or if the account’s ability to send mails is paused for 90 days. In the latter, all addresses in the suppression list are deleted.

Enable SES Suppression List

If you started using SES after 25 November 2019, then this feature will be there in your account by default. Otherwise you’ll have to enable it manually.

Run the following CLI command to enable suppression list for your account

aws sesv2 put-account-suppression-attributes \
--suppressed-reasons BOUNCE COMPLAINT