If you're used to running any kind of mail service, you will know there are times when you have to figure out whether an email was delivered somewhere or not. Typically when recipients say they aren't getting emails and you need to identify if the problem is their end or yours.
This CloudForomation sets that up for you:
-
Create a Lambda to accept SES notifications
-
Allow that Lambda to write to CloudFormation
The template doesn't include these bits, so you'll need to do it manually:
-
Go to
SES > Configuration Sets
-
Create a new
SNS Destination
-
Tick the
Event types
you want to receive (this setup hasn't been tested with Click and Open) -
Choose a name like
SesSmtpLogging
(you will need to use this in your email sending app) -
Choose the topic created previously by CloudFormation,
sns-smtp-log
-
Save
Next up when sending your SES email via the API you will need to tell it to use this ConfigSet
:
{
Destination: {
ToAddresses: ["[email protected]"]
},
Source: "[email protected]",
ConfigurationSetName: 'SmtpLogging' // unless you used a different name than that above
// etc...
}
Send some test emails and you should now see results in appearing in cloudwatch under something like:
sns-smtp-logging-SnsToCloudwatch-XXXX
See the links below for an example of all the events SES will send.
Examples of event data that Amazon SES publishes to Amazon SNS