EventBridge is an event bus that lets AWS services, third-party vendors, and customers publish and subscribe to events. Rules match incoming events and route them to one or more targets, such as Lambda functions. section 6.3.1
Use EventBridge in two practical ways:
- Schedule a rule to publish an event every five minutes, invoking a Lambda function that checks a website. section 6.2
- Match infrastructure events, such as an EC2 launch recorded by CloudTrail, and invoke Lambda to automate follow-up work. section 6.3.1
- Filter events with attributes such as source, detail-type, eventSource, and eventName. section 6.3.1
Automated website health check
Create a Lambda function that sends an HTTP request and verifies expected text in the response. Configure an EventBridge rule to invoke it every five minutes, then use a CloudWatch alarm to notify you when checks fail. section 6.2
Tag newly launched EC2 instances
CloudTrail emits an event for an EC2 RunInstances API call. An EventBridge rule matches the event pattern and invokes Lambda, which can use the instance ID from the event to add a tag. section 6.3.1
