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)