Application Integration
    🔗Application Integration

    Amazon EventBridge

    Serverless event bus for connecting applications with real-time data

    Think of EventBridge like a super-smart post office that doesn't just deliver mail; it reads the envelopes, sorts them by topic, and sends them to anyone who's subscribed to that kind of news. Instead of your application asking 'Did anything happen yet?' a million times (like a kid on a road trip asking 'Are we there yet?'), EventBridge tells your application the moment something interesting happens. It's pub-sub messaging, but with built-in pattern matching and routing to dozens of AWS services.

    EventBridge operates on an event bus architecture. You have a default event bus (for AWS service events), custom event buses (for your applications), and partner event buses (for SaaS integrations). Events are JSON objects that flow into the bus, where rules evaluate them using pattern matching. A rule might say 'If an EC2 instance state changes to terminated AND it has tag Environment=Production, then invoke Lambda function X and send an SNS notification.' EventBridge supports over 90 AWS service targets, including Step Functions, SQS, ECS tasks, API Gateway, and even cross-account/cross-region event buses. Content-based filtering happens server-side, so you're not paying for invocations you don't need.

    Gotchas & Constraints

    Gotcha #1: EventBridge delivers events at-least-once; targets must be idempotent. Gotcha #2: Event pattern matching is case-sensitive and requires exact matches. Constraints: Maximum 5 targets per rule, maximum 300 rules per event bus, and events are retained for 24 hours if delivery fails.

    An e-commerce platform needs to decouple order processing. When an order is placed, multiple downstream systems need to react: inventory must be reserved, payment processed, shipping labels generated, and analytics updated. Previously, the order service called each system synchronously, creating tight coupling and cascading failures. With EventBridge, the order service publishes a single 'OrderPlaced' event to a custom event bus. Four EventBridge rules listen for this pattern, each routing to different targets: Lambda for inventory, Step Functions for payment orchestration, ECS Fargate for label generation, and Kinesis Data Firehose for analytics. If the shipping label service is down, it doesn't block order confirmation. Failed targets can use DLQs for retry logic. They also create rules for AWS service events: when an EC2 instance terminates unexpectedly, EventBridge triggers Lambda to investigate and send alerts.

    The Result

    decoupled architecture, resilient to failures, and easy to extend with new event consumers.

    Official AWS Documentation