Authentication vs Authorization in AWS Amplify
Authentication vs Authorization in AWS Amplify
Why Permissions Feel Confusing in Amplify
How to Build a Scalable, Real-Time Notification System in AWS Amplify Notifications are a core part of modern applications — they guide users, drive engagement, and deliver critical updates in real …
Notifications are a core part of modern applications — they guide users, drive engagement, and deliver critical updates in real time.
But designing a notification system that is fast, reliable, and scalable isn’t as simple as adding a database table and sending emails. Without the right architecture, you risk performance bottlenecks, missed deliveries, and code that’s painful to extend.
In this guide, I’ll walk you through the architecture and approach I use to build event-driven notifications with AWS Amplify, SQS, Lambda, DynamoDB, and SES.
A straightforward approach is to send notifications directly from your backend logic:
It works for small workloads — but quickly causes issues:
We need a design that’s decoupled, fault-tolerant, and easy to extend.
The architecture I use is built around an event-driven pattern:
In AWS Amplify, I define a Notification model with:
I also add a Global Secondary Index (GSI) on userId + readStatus so I can instantly query unread notifications.
Instead of embedding notification logic inside each feature, producers simply publish a message to SQS.
Examples:
This ensures:
The Consumer Lambda is subscribed to the SQS queue.
Using Amazon SES, I set up branded HTML and plain text templates for:
Templates are easy to extend for new types, and the email sender address (the “From” field in outgoing emails) is set via an environment variable, so it can be changed without code updates.
The frontend uses a React hook (useNotifications) that:
Notification.onCreate scoped by userIdFor marking all unread notifications as read in one click:
Adding a new notification type is simple:
notificationType to your event definitionNo changes are needed in the producers — they just publish the event.
A well-designed notification system is more than just “alerts.”
It’s a communication bridge between your backend events and your users, delivering information at the right time and in the right way.
By using an event-driven approach with SQS, Lambda, DynamoDB, and SES, you get a system that’s fast, fault-tolerant, and ready to grow.
A version of this article was first published on August 13, 2025 on Medium.
Why Permissions Feel Confusing in Amplify
What is AWS Amplify? Building a React app is the easy part. Then the “real app” requirements show up: Users need to sign up and log in You need an API You need a database You need file …
Why AWS Lambda Layers Become Essential as Your Serverless App Grows