BLOGS

Serverless Notification Service Design in AWS - with diagrams

July 25, 2024

In this article, we design a fully Serverless Notification Service using AWS to send product-to-user notifications. Fully scalable, extensible, with minimal cost.

Serverless Notification Service Design in AWS - with diagrams

In this article, we design a fully Serverless Notification Service using AWS to send product-to-user notifications. Fully scalable, extensible, with minimal cost.

Background and Motivation

We discussed why some software development teams consider an internal or external notification service in our Ultimate Guide to Notification Services, including reasons such as:

We also proposed a generic Notification Service Design compatible with any cloud provider, with critical technical constraints and business requirements. This article proposes a Serverless design for a notification microservice with AWS services, given the same objectives mentioned in the previous article.

High-Level Architecture

Step-by-Step Architecture

1. POST /send

2. Match Notification Preferences

{
  primaryKey: "user_id:notification_id",
  preferences: {
    email: true,
    sms: false
  }
}

3. Get User Attributes

4. Publish to Fanout

5. Fanout to Job Processors

6. Process Delivery Jobs

Further Improvements

Here are a few things that are possible but we haven’t covered. If you need any of these capabilities, read the next section.

An external Notification-as-a-Service

Building an internal notification service is a lot of (annoying) work. We know because we have built this a few times in our careers.

That is why we made NotificationAPI: a plug-and-play notification-as-a-service solution. It takes 10 minutes to configure and integrate and gives you much more functionality, including in-app notifications, feature flags, and logs.

“If I had to describe NotificationAPI in one word, it would be simple!”

— Jacob Brown, Software Team Lead

Watch Jacob’s interview, discussing how they implemented their notifications from scratch, then switch to NotificationAPI.