How to Track Email Opens, Clicks, and Bounces Using AWS SES, SNS, and CloudWatch

When it comes to monitoring your systems and applications, you'll soon start to look at email notifications to help you get alerts whenever issues are occurring. These types of email alerts are generally configured under an administrator email account or similar within the specific application where all emails go through.

Depending on the complexity of your systems and technologies, these types of email notification configurations may be straightforward via a graphical user interface (GUI), or you may be digging around at the command line using the console to configure specific packages to send out email notifications. One of the most important things though, beyond the configuration, is that you need to be able to view information about what has happened off the back of an email being sent by the system.

Messaging in AWS Using SNS and SQS

There are two main communication paradigms in event-driven architectures used in microservices design. 

  • Queueing provides a messaging system to integrate two different services.
  • Publish/subscribe messaging is a form of asynchronous service-to-service communication used in microservices architectures. In contrast to queueing, publish/subscribe messaging allows multiple consumers to receive each message in a topic. 

They allow us to de-couple producers and consumers of messages. By combining publish/subscribe messaging systems with queueing systems, we can build fault-tolerant, scalable, resilient, and reactive application architectures. Amazon Web Services (AWS) offers a number of services which provide these two communication paradigms. In this article, we will learn how to program AWS services – Simple Notification Service (SNS) for publish/subscribe messaging and Simple Queue Service (SQS) for queueing using AWS SDK in Java.