Event-Driven Architecture
Last updated
Was this helpful?
Last updated
Was this helpful?
see .
Event-driven architecture (EDA) is an architectural pattern that enables the integration of serverless services through asynchronous event triggering across AWS environments. This approach promotes scalability, cost efficiency, and alignment with the Well-Architected Framework.
An event represents a significant occurrence or fact that has happened at a specific moment in time within a system. Specifically, it is:
A record of something that has occurred in the past - it is immutable and represents a fact that cannot be changed.
A notification that captures what changed in the system, including relevant details about what happened, when it happened, and any associated data.
A message that interested parties (event consumers) can use to react to the change, make decisions, update their own state, trigger workflows, or maintain data consistency across distributed systems.
AWS Lambda
Serverless compute platform
Executes custom logic
Core component for event processing
Amazon EventBridge
Central event bus
Choreographs asynchronous events
Implements event filtering and routing
AWS Step Functions
Orchestrates workflows
Manages service integration
Handles state management
Amazon SQS (Simple Queue Service)
Event buffering
Workflow decoupling
Message queuing
Amazon SNS (Simple Notification Service)
Event notification
Supports service and human subscribers
Push-based messaging
Amazon API Gateway
Handles external event triggers
Front-end integration
API management
Amazon DynamoDB
Serverless NoSQL database
Optimized for event-driven systems
Scalable data storage
Amazon S3
Object storage
Event emission capabilities
Trigger-based integrations
Managed by AWS Step Functions
Handles coupled workflows
Supports decision trees and retries
Maintains workflow state
Managed by EventBridge
Asynchronous coordination
Multiple producers and consumers
Loose coupling
Can include orchestrated components
Front-end Application
Initiates new order
Connects via API Gateway
Event Processing
Lambda function processes initial request
EventBridge routes based on rules
Step Functions determine customer status
Order Fulfillment
Dedicated Step Function workflow
Processes order details
Triggers completion events
Front-end Updates
Lambda function handles updates
IoT Core manages WebSocket connections
Real-time user notification
EventBridge Capabilities
Asynchronous event choreography
Rule-based event routing
Service integration
Step Functions Use Cases
State management
Idempotency requirements
Dependent event handling
Solution Design
Serverless for new workloads
Integration of main players
Well-Architected Framework alignment
Service Selection
Choose appropriate serverless services
Consider scaling requirements
Evaluate cost implications
Architecture Design
Implement loose coupling
Plan for asynchronous operations
Design for scalability
Event Management
Define clear event patterns
Implement proper error handling
Monitor event flows