Event Notification Service - AWS
Serverless event-driven system on AWS
A serverless event notification system built on AWS that enables publishers to submit events and subscribers to receive notifications through email or webhooks based on filtering preferences. Wanted to learn cloud architecture and serverless patterns.
Features:
- Event ingestion via
REST APIwith API key authentication - Multi-channel delivery (email via
SES, webhooks via HTTP) - Asynchronous processing with
SQSbuffering - Dead-letter queue for failed messages
-
CloudWatchmonitoring and alerting
Tech Stack
- Cloud Platform:
AWS - Compute:
Lambda(3 serverless functions) - API:
API Gatewaywith API key auth - Messaging:
SQS(main queue + DLQ) - Database:
DynamoDB(Events, Subscriptions, Notifications) - Notifications:
SES(email),SNS(alerts) - Monitoring:
CloudWatchLogs & Alarms - Security:
IAMleast-privilege policies
Architecture
Event-driven serverless architecture with decoupled components:
Publisher
│
│ POST /events
▼
┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐
│ API Gateway │──> │ Lambda │───>│ SQS │
└─────────────┘ │ (Ingest) │ │ (events-queue) │
└─────────────┘ └──────────┬──────────┘
│
▼
┌──────────────────┐ ┌─────────────────────┐
│ DynamoDB │<──────│ Lambda │
│ (Events & │ │ (Processor) │
│ Notifications) │ │ │
└──────────────────┘ └─────────┬───────────┘
│
┌──────┴──────┐
▼ ▼
┌───────┐ ┌─────────┐
│ SES │ │ Webhook │
│(Email)│ │ (HTTP) │
└───────┘ └─────────┘
┌────────────┐ ┌──────────────┐
│ DLQ │────>│ CloudWatch │────> Alert Email
│ (failures) │ │ Alarm │
└────────────┘ └──────────────┘
Key Features & Implementation
- Event Ingestion - REST API via
API Gatewayaccepts events with type, severity, and metadata, triggering Lambda for validation and SQS submission. - Subscription Management -
DynamoDBstores subscriber preferences with filters for event type and severity levels. - Asynchronous Processing -
SQSbuffers events for reliable async processing with Lambda polling for fault tolerance. - Multi-Channel Delivery - Event processor Lambda matches subscriptions and sends notifications via SES (email) or HTTP webhooks.
- Error Handling & Monitoring - Dead-letter queue captures failed messages, CloudWatch alarms trigger SNS alerts for system health monitoring.
API Endpoints
POST /events - Submit new event
{
"eventType": "deployment",
"severity": "HIGH",
"title": "API v2.1 deployed to production",
"details": {
"service": "user-api",
"version": "2.1.0"
}
}
POST /subscriptions - Create notification subscription
{
"eventType": "deployment",
"severityFilter": "HIGH",
"channel": "EMAIL",
"target": "ops-team@company.com"
}
Learnings
- New Technologies:
AWS Lambda,API Gateway,SQS,DynamoDB,SES - Use
CloudWatchfor observability, logging, and alarms; these are critical for debugging and monitoring serverless systems.
Links
- GitHub Repository: ctheara/event-notification-service-aws
- AWS Setup Guide: docs/aws-setup.md
Technologies: AWS · Lambda · API Gateway · SQS · DynamoDB · SES · CloudWatch · IAM · Serverless · Event-Driven Architecture