Visit the AWS Simple Notifications Service (SNS) home page and create a new topic: https://eu-west-1.console.aws.amazon.com/sns/v3/home
We called ours SESNotifications
and then clicked Next step
.
You will see a page where you can configure your SNS topic:
Ignore all the optional configurations and
just scroll to the bottom of the page
and click Create topic
:
You will then see a confirmation page saying your topic was created successfully:
On this page, scroll till you find the Create subscription
button:
(Click it)
Once you have selected/input the relevant data,
click the Create subscription
button:
You should see a confirmation that your subscription was created successfully:
This section follows and expands on the official instructions: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-sns-notifications.html
Once you have created the SNS Topic,
visit the SES home page
and click on Email Addresses
:
https://eu-west-1.console.aws.amazon.com/ses
Click on the verified email address you want to configure SNS notifications for:
In the Notifications
section,
click on Edit configuration
:
Select the SNS topic we created above
for all the types of notification
then click Save Config
:
Your configuration should now look something like this:
In the Lambda configuration page https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1#/functions/aws-ses-lambda-v1 configure a bounce event to an email address you know does not exist:
Run the bounce event in the Lambda console:
You will see a "success" message confirming that the aws-ses-lambda
attempted to send the email to the bounce@dwyl.com
address (which we know will fail). Our lambda function and AWS SES does not know that the bounce@dwyl.com
address will bounce. That's the reason we need to have the SNS topic so we can monitor bounce events!
The SNS bounce notification event
is saved to S3
thanks to #12
https://ademoapp.s3-eu-west-1.amazonaws.com/event.json
For the purposes of testing our parser,
we save this event
JSON in:
test/fixtures/sample_sns_bounce.json
Now we can parse the notification!