Week 5 — Core Event-Driven Concepts
- Learn (Day 1–2)
Understand:
🔹 SQS
Message queue
Stores tasks until processed
One consumer processes message
🔹 SNS
Pub/sub system
Sends same message to multiple subscribers
🔹 EventBridge
Smart event router
Filters and routes events based on rules
- Extend Your Existing App (Day 2–3)
Start from your Phase 2 API (Orders or Users system).
Modify:
Instead of:
API → DB only
Now:
API → DB + Event Published
Example event:
{
"eventType": "ORDER_CREATED",
"orderId": "123",
"userId": "abc",
"timestamp": "..."
}
- Add EventBridge (Day 3–4) Create: EventBridge Event Bus (custom bus) Flow: Order Lambda sends event → EventBridge Rule:
Route based on:
eventType = ORDER_CREATED
- Create First Consumer (Day 4–5) Lambda: Email Simulation
Triggered by EventBridge
Does:
Logs email message like:
"Email sent to user for order 123"
👉 This simulates async email system
📅 Week 6 — Scale with SQS + SNS
- Add SQS for Reliable Processing (Day 1–2) Use case:
Order processing queue
Flow:
EventBridge → SQS Queue → Lambda Consumer
Why:
Ensures no event is lost
Can retry automatically
- Add SNS for Fan-out (Day 2–3) Use case:
One event → multiple systems
Flow:
Order Created → SNS Topic
↓ ↓ ↓
Email Analytics Logging
Each Lambda subscribes to SNS topic.
- Build 3 Async Consumers (Day 3–4)
Create Lambdas:
📧 Email Service Lambda
📊 Analytics Lambda
🪵 Logging Lambda
Each one:
Triggered by SNS or SQS
Runs independently
- Observability (Day 4–5)
Use:
CloudWatch logs
Event tracing
Check:
Event delivery
Lambda execution logs
Queue processing
🧠 Final Architecture (What you’ve built)
You now have:
🚀 Event-driven system:
API creates order
Event published
Multiple services react independently
🧩 Final Outcome Statement
After this phase, you can confidently say:
“I design event-driven systems using AWS services like SQS, SNS, and EventBridge to build scalable, decoupled architectures.”
Top comments (0)