Listen to this Post

AWS EventBridge is a powerful service for building event-driven architectures (EDAs). It allows you to react to AWS API events, schedule actions, and transform data without writing additional Lambda functions. Input transformations in EventBridge help simplify verbose AWS event formats into more readable alerts using JSON path expressions.
🔗 Reference: AWS EventBridge Transforms: Making Alerts Readable
You Should Know:
1. Basic EventBridge Rule with Input Transformation
To transform an AWS CloudWatch alarm into a simplified format:
{
"source": ["aws.cloudwatch"],
"detail-type": ["CloudWatch Alarm State Change"],
"detail": {
"state": {
"value": ["ALARM"]
}
}
}
Input Transformer:
{
"AlarmName": "<$.detail.alarmName>",
"NewState": "<$.detail.state.value>",
"Reason": "<$.detail.state.reason>"
}
2. Scheduling Events with EventBridge
Use EventBridge to trigger a Lambda function on a schedule:
aws events put-rule --name "DailyLambdaTrigger" --schedule-expression "rate(1 day)"
3. Filtering and Routing Events
To route only specific S3 events to a target:
{
"source": ["aws.s3"],
"detail-type": ["AWS API Call via CloudTrail"],
"detail": {
"eventSource": ["s3.amazonaws.com"],
"eventName": ["PutObject", "DeleteObject"]
}
}
4. Testing EventBridge Rules Locally
Use the AWS CLI to simulate an event:
aws events put-events --entries file://event.json
Example `event.json`:
[
{
"Source": "my.app",
"DetailType": "order.placed",
"Detail": "{ \"orderId\": \"12345\", \"amount\": 100 }"
}
]
5. Monitoring EventBridge with CloudWatch Logs
Ensure your events are logged:
aws logs create-log-group --log-group-name "/aws/events/eventbridge" aws logs put-retention-policy --log-group-name "/aws/events/eventbridge" --retention-in-days 14
What Undercode Say:
EventBridge is a game-changer for serverless event processing. By leveraging input transformations, you reduce Lambda overhead and streamline event handling. Key takeaways:
– Use JSON path for cleaner event data.
– Schedule tasks without cron jobs.
– Filter events efficiently to reduce noise.
– Monitor with CloudWatch for debugging.
For advanced use, explore EventBridge Pipes and Schema Registry for structured event management.
Prediction:
As serverless architectures grow, EventBridge will become the backbone of real-time event processing, replacing custom middleware in many cases. Expect deeper integrations with AI-driven event analysis.
Expected Output:
A structured, actionable guide on AWS EventBridge transformations with practical commands and JSON examples.
IT/Security Reporter URL:
Reported By: Darryl Ruggles – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅


