← Back to all products

Event-Driven Architecture Kit

$39

Event sourcing, CQRS, and pub/sub patterns with Kafka, SQS/SNS, Event Grid implementations and schemas.

📁 24 files
JSONPythonTerraformYAMLMarkdownAWS

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 24 files

event-driven-architecture/ ├── LICENSE ├── README.md ├── cloudformation/ │ ├── event-bus-stack.yaml │ └── sns-fanout-stack.yaml ├── docs/ │ ├── architecture.md │ ├── event_patterns.md │ └── troubleshooting_guide.md ├── examples/ │ ├── event_catalog.yaml │ └── event_schemas/ │ ├── inventory_events.json │ ├── order_events.json │ └── payment_events.json ├── free-sample.zip ├── guide/ │ ├── 01_what-s-included.md │ ├── 02_prerequisites.md │ ├── 03_configuration-reference.md │ └── 04_faq.md ├── index.html ├── scripts/ │ ├── dlq_processor.py │ ├── event_flow_visualizer.py │ └── event_schema_validator.py └── terraform/ ├── eventbridge_rules.tf ├── kinesis_streams.tf ├── sqs_sns_topology.tf └── variables.tf

📖 Documentation Preview README excerpt

Event-Driven Architecture Toolkit

Production-ready infrastructure templates for building event-driven systems on AWS: SQS/SNS fan-out, EventBridge routing, Kinesis streaming, dead letter queue processing, and schema validation -- all codified in Terraform and CloudFormation.

Stop building point-to-point integrations that become spaghetti. This toolkit gives you battle-tested patterns for decoupled, scalable event-driven architectures. Every pattern is implemented as deployable IaC with monitoring, DLQ handling, and schema enforcement built in.

Built for backend engineers and architects designing microservice communication, real-time data pipelines, and async processing workflows.


What's Included

CategoryFilesDescription
Terraformsqs_sns_topology.tf, eventbridge_rules.tf, kinesis_streams.tf, variables.tfIaC for SQS/SNS fan-out, EventBridge routing, and Kinesis streaming
CloudFormationevent-bus-stack.yaml, sns-fanout-stack.yamlEventBridge custom bus and SNS fan-out pattern stacks
Scriptsevent_schema_validator.py, event_flow_visualizer.py, dlq_processor.pySchema validation, flow visualization, and DLQ replay tools
Docsarchitecture.md, event_patterns.md, troubleshooting_guide.mdArchitecture diagrams, pattern catalog, and debugging guide
Examplesevent_schemas/*.json, event_catalog.yamlEvent schemas for order, payment, and inventory domains

Architecture Patterns Implemented


Pattern 1: Fan-Out (SNS → SQS)             Pattern 2: Event Bus (EventBridge)
┌─────────┐                                  ┌─────────────┐
│ Producer │──→ SNS Topic                    │  Producer   │──→ EventBridge Bus
└─────────┘      │                            └─────────────┘      │
                 ├──→ SQS Queue A (Service A)                      ├──→ Rule 1 → Lambda
                 ├──→ SQS Queue B (Service B)                      ├──→ Rule 2 → SQS
                 └──→ SQS Queue C (Analytics)                      └──→ Rule 3 → Step Functions

Pattern 3: Streaming (Kinesis)               Pattern 4: DLQ + Replay
┌─────────┐                                  ┌─────┐    ┌─────┐    ┌─────┐
│ Producer │──→ Kinesis Stream               │ SQS │──✗─│ DLQ │──→ │Replay│
└─────────┘      │                            └─────┘    └─────┘    └─────┘
                 ├──→ Lambda Consumer                                  │
                 ├──→ Firehose → S3                                    ▼
                 └──→ Analytics                                   Back to SQS

Prerequisites

  • AWS Account with permissions for SQS, SNS, EventBridge, Kinesis, Lambda, IAM
  • Terraform >= 1.5.0
  • Python >= 3.10 (stdlib only -- no pip packages needed)
  • AWS CLI v2 configured with appropriate credentials

Quick Start

1. Deploy SQS/SNS Fan-Out Topology (Terraform)


cd terraform/
terraform init
terraform plan -var="environment=production" \
               -var="project_name=my-platform" \
               -var="alert_email=team@example.com"
terraform apply

... continues with setup instructions, usage examples, and more.

📄 Code Sample .py preview

scripts/dlq_processor.py #!/usr/bin/env python3 """ DLQ Processor — Inspect, Filter, and Replay Dead Letter Queue Messages ======================================================================== Tool for managing dead letter queue (DLQ) messages in SQS-based event-driven architectures. Provides dry-run inspection, filtering, replay to source queues, and export for offline analysis. WHY this tool exists: DLQ messages represent business operations that FAILED. A payment.completed event in the DLQ means a customer paid but their order wasn't processed. Every minute those messages sit in the DLQ, the business is losing money and trust. This tool helps you triage, filter, and replay DLQ messages quickly — without writing throwaway scripts under pressure. Features: - Inspect DLQ contents without consuming messages (peek mode) - Filter messages by event type, time range, content patterns - Replay messages back to source queue with rate limiting - Export messages to JSONL for offline analysis - Dry-run mode for safe exploration - Detailed statistics on failure patterns Usage: # Preview DLQ contents (dry run, doesn't consume) python dlq_processor.py --queue-url https://sqs.../my-dlq --dry-run # Replay all messages back to source queue python dlq_processor.py --queue-url https://sqs.../my-dlq \\ --replay --source-queue-url https://sqs.../my-queue # Filter and replay only specific event types python dlq_processor.py --queue-url https://sqs.../my-dlq \\ --replay --filter-event-type order.created \\ --source-queue-url https://sqs.../my-queue # Export DLQ to file for analysis python dlq_processor.py --queue-url https://sqs.../my-dlq --export dlq-dump.jsonl NOTE: This script requires AWS credentials configured (via AWS CLI, environment variables, or IAM role). For demonstration, it generates sample data when run without AWS connectivity. Copyright (c) 2024 Cloud Architecture Pro Licensed under the MIT License """ from __future__ import annotations # ... 665 more lines ...
Buy Now — $39 Back to Products