Serverless Scheduled Email Notifier

AWS Lambda · Amazon SES · Amazon EventBridge Scheduler — a hands-on project exploring SES as a verified sending domain with multiple identities
AWS Lambda Amazon SES Amazon EventBridge IAM CloudWatch Logs Python (boto3) Serverless

Overview

This project was built to understand how Amazon SES works as a verified sending domain with multiple named identities. The domain sharathonline.com is verified once in SES, and three distinct "personas" send from it: happy-morning@sharathonline.com, happy-evening@sharathonline.com, and story-time@sharathonline.com. Three independent AWS Lambda functions generate content and send email through SES, each triggered on its own weekday schedule via Amazon EventBridge — with no servers to manage.

Architecture Diagram

Amazon EventBridge Scheduler Weekdays @ 10:00 AM IST EventBridge Weekdays @ 6:30 PM IST λ AWS Lambda morning-mailer.py random quote from quotes.txt λ AWS Lambda story-mailer.py fetches story + moral via HTTPS External API shortstories-api .onrender.com λ AWS Lambda evening-mailer.py random quote from quotes.txt Amazon SES — Verified Domain: sharathonline.com happy-morning@ sharathonline.com story-time@ sharathonline.com happy-evening@ sharathonline.com Amazon SES Recipient Inbox(es) via RECIPIENT_EMAIL env var Amazon CloudWatch Logs execution logs & errors
Fig. 1 — Scheduled, event-driven email pipeline across three independent Lambda functions sharing one verified SES domain

Lambda Functions

Function Sender Identity Content Source Schedule (EventBridge) Notes
morning-mailer.py happy-morning@sharathonline.com quotes.txt (random pick) Weekdays, 10:00 AM IST Supports multiple recipients (comma/semicolon separated) from one env var
evening-mailer.py happy-evening@sharathonline.com Accomplishment-themed quotes file Weekdays, 6:30 PM IST Same random-quote pattern, different tone/content set
story-mailer.py story-time@sharathonline.com External API: shortstories-api.onrender.com Weekdays, 10:00 AM IST Subject line built dynamically from the story's moral; handles HTTPError/URLError

How It Works

Key Learnings

Sample Email Outputs

morning-mailer sample email
morning-mailer.py
happy-morning@sharathonline.com
evening-mailer sample email
evening-mailer.py
happy-evening@sharathonline.com
story-mailer sample email
story-mailer.py
story-time@sharathonline.com
Fig. 2 — Actual delivered emails from each scheduled Lambda function