🎯 Amazon EventBridge
EventBridge is a serverless event bus that connects your applications using events. For Domain 4, it's used for automated remediation, scheduled monitoring workflows, and event-driven alerting and responses.
🔑 Covers: Event Bus · Rules · Targets · Scheduled Events · Automated RemediationWhat is Amazon EventBridge?
📋 Key EventBridge Concepts
🌊 Event Bus
The channel events flow through. AWS has a default event bus that receives events from all AWS services. You can create custom buses for your own application events.
📋 Rule
Defines which events to match and what target to invoke. Rules use event patterns (JSON matching) or schedules (cron/rate expressions) to trigger targets.
🎯 Target
What gets triggered when a rule matches. Examples: Lambda function, SQS queue, SNS topic, Step Functions, ECS task, CloudWatch Logs.
⚙️ Two Types of Rules
📅 Scheduled Rules
Run on a time schedule. Like a cron job in the cloud.
Rate expression: rate(5 minutes), rate(1 day)
Cron expression: cron(0 8 * * ? *) = every day at 8am UTC
Use cases: Daily reports, cleanup jobs, periodic health checks, database backups.
📡 Event Pattern Rules
Match specific events from AWS services or your apps.
Example: "When an EC2 instance is terminated" or "When a CodePipeline deployment fails" or "When a DynamoDB table is deleted"
Use cases: Automated responses to AWS events, security alerting, compliance enforcement.
🔧 Automated Remediation Examples
| Event (Trigger) | Target (Action) | What it does |
|---|---|---|
| CloudWatch Alarm state changes to ALARM | Lambda function | Auto-restart a stuck service, scale out resources |
| EC2 instance state changes to "stopped" | Lambda function | Alert operations team via Slack/PagerDuty |
| CodePipeline pipeline fails | SNS topic → Email | Alert developer of failed deployment |
| S3 bucket policy changes (via CloudTrail) | Lambda function | Revert unauthorized policy changes automatically |
| Rate(1 hour) | Lambda function | Run hourly health check report |
| IAM user created (via CloudTrail) | Lambda function | Enforce tagging, send notification to security team |