Skip to main content
In this lesson we cover event-driven notifications for monitoring and logging with an emphasis on patterns and decision criteria that matter for the AWS Certified DevOps Engineer — Professional exam. Event-driven notifications let you detect, analyze, and respond to operational problems automatically. Instead of only sending an email when something goes wrong, alarms can drive deterministic remediation or orchestration flows. The goal is to reduce mean time to recovery (MTTR) and operational overhead by making responses immediate, reliable, and auditable. Key concepts at a glance:
  • Source: CloudWatch Alarms are a common event source.
  • Publish: Alarms raise events (alarm actions).
  • Route: Events are routed via SNS (fan-out) or EventBridge (content-based routing).
  • Consume: Targets include Lambda, Step Functions, Systems Manager runbooks, SQS, or third-party services (PagerDuty, Slack).
  • Respond: Targets perform remediation, orchestration, alerting, and archival for audit.
Benefits: faster response (reduced MTTR), reliable scaled delivery, and automated remediation and auditing pipelines. Typical flow pattern:
  1. CloudWatch Alarm detects an issue.
  2. The alarm publishes an event (CloudWatch alarm action).
  3. Events are routed (SNS for simple fan-out, EventBridge for intelligent routing).
  4. A target consumes the event: Lambda, Step Functions, Systems Manager, SQS, third-party tools.
  5. The target performs remediation, orchestration, alerting, and/or archival.
What an alarm can trigger (examples) When to use Lambda for custom response logic
  • Choose Lambda when you need custom processing that SNS or EventBridge targets cannot provide natively — complex auto-remediation, alert enrichment, intelligent throttling, special protocol handling, or integrations requiring custom IAM behavior.
  • On the exam, Lambda is often the fallback: prefer built-in routing and native targets in SNS/EventBridge when they meet the requirement.
The slide titled "AWS Lambda for Custom Response Logic" shows five numbered feature cards: 01 Auto-Remediation, 02 Alert Enrichment, 03 Intelligent Throttling, 04 Smart Routing, and 05 External Integration. Each card has a simple icon above the feature label.
SNS — the notification hub
  • Pub/sub, serverless, highly available, and scalable.
  • Typical uses: simple fan-out, alerts to email/SMS/HTTP endpoints, invoking Lambda, or placing messages into SQS.
  • Key features: message attributes for filtering, retry logic, dead-letter queue (DLQ) support, and flexible protocols (email, SMS, HTTP/S, Lambda, SQS).
  • Best for: simple fan-out to multiple subscribers or broadcasting the same message to independent systems.
EventBridge — the intelligent event router
  • Routes events using JSON content and event patterns (not just message attributes).
  • Targets: Lambda, Step Functions, CodePipeline, Systems Manager, cross-account event buses, third-party partners, and more.
  • Capabilities: content-based filtering, transformations, archive-and-replay, cross-account routing, and advanced routing logic.
  • Prefer EventBridge for complex routing rules, cross-account scenarios, archival/replay needs, or where you need many targets and transformations.
Comparison: SNS vs EventBridge Note: If a requirement mentions event replay/archival or content-based transformations, prefer EventBridge. SNS does not support event replay or full content-based routing. Flow examples and when to pick them
A slide titled "Integration Patterns and Architectures" showing an "Intelligent Routing" flow: a CloudWatch Alarm triggers an EventBridge rule that sends high-severity alerts to a Lambda function and PagerDuty, and low-severity alerts to Slack.
Cross-account incident management
  • Pattern: CloudWatch alarms in application accounts forward events to a centralized EventBridge bus in a security or management account. That central account can run Systems Manager OpsCenter, ticketing, or other incident tooling.
  • EventBridge simplifies cross-account routing versus SNS, especially at scale (many accounts in a landing zone).
A diagram titled "Integration Patterns and Architectures — Cross-Account Incident Management" showing an AWS flow where a CloudWatch Alarm in Account A sends events to EventBridge, which forwards them to a Security Account running Systems Manager OpsCenter. The diagram illustrates cross-account event forwarding for incident management.
Best practices
  • Configure dead-letter queues (DLQs): capture messages or events that fail delivery so you can inspect and reprocess them.
  • Implement exponential backoff and retries: avoid thundering herds and reduce downstream overload during failures.
  • Centralize logs and traces: ship CloudWatch Logs, X-Ray traces, or a centralized logging pipeline for diagnostics and post-mortem analysis.
  • Test failure scenarios: use chaos or fault-injection tests to validate automatic remediation and alerting behavior.
A presentation slide titled "Event-Driven Notifications – Best Practices" with four numbered boxes. The items are: Configure Dead‑Letter Queues, Implement Exponential Backoff, Use CloudWatch Logs, and Test Failure Scenarios.
Operational hygiene recommendations
  • Tag resources and use descriptive naming to capture ownership and intent.
  • Document alert thresholds and the rationale for each alarm to avoid organizational amnesia.
  • Implement alert throttling, deduplication, or suppression windows to reduce alert fatigue and keep signals actionable.
A presentation slide titled "Event-Driven Notifications – Best Practices" listing four recommendations: Tag All Resources, Use Descriptive Naming, Document Thresholds, and Implement Alert Throttling, each with a short explanation. Each item is paired with a blue icon and the slide is branded © KodeKloud.
Operational considerations and common traps
  • Sync vs async: decide whether remediation must be immediate (synchronous) or can be deferred (asynchronous). Synchronous flows may invoke Lambda directly; batch or rate-limited remediation can use SQS workers.
  • DLQ placement: attach DLQs where failures will occur — SNS for delivery failures, SQS or Lambda DLQs for processing failures. Choose placement to make failures observable and reprocessable.
  • Volume and scale: EventBridge is often easier to manage at very high event volumes and across many accounts.
  • Permissions and security: validate IAM roles and resource policies for cross-account access (EventBridge event bus policies, SNS topic policies, Lambda roles).
  • Target vs protocol: EventBridge uses targets (service integrations); SNS uses protocols (email, SMS, HTTP/S, Lambda). Read the question carefully—are they asking about a target or a protocol?
A presentation slide titled "Exam Tips" with four colorful boxes across the bottom. Each box lists a topic—SNS vs EventBridge, Sync vs Async, DLQ Placement, and Cross-Account Access—with short notes about fan-out vs routing, immediate vs deferred responses, DLQs at SNS or Lambda, and event bus vs topic policies.
If an exam requirement mentions cross-account routing, event replay/archival, or content-based transformations, prefer EventBridge. For simple pub/sub fan-out, protocol diversity (email/SMS), or rapid notifications, prefer SNS.
Design for failure: enable DLQs, retries with exponential backoff, and verify IAM/resource policies for cross-account flows. Missing DLQs or incorrect permissions are common operational mistakes and exam traps.
Summary
  • Source events with CloudWatch Alarms.
  • Choose SNS for simple, reliable fan-out and protocol flexibility (email/SMS/HTTP).
  • Choose EventBridge for content-based routing, cross-account buses, transformations, and event replay/archival.
  • Use Lambda for custom processing only when native service integrations don’t meet the requirement.
  • Apply DLQs, retries, tagging, descriptive naming, and failure testing to build robust, production-ready event-driven notification systems.
Next steps
  • Reinforce these concepts with hands-on labs: create a CloudWatch Alarm, publish to SNS and to EventBridge, then wire Lambda, SQS, and Systems Manager targets.
  • Practice exam-style scenarios that require choosing between SNS and EventBridge, selecting DLQ placement, and designing cross-account flows.
Links and references

Watch Video