Amazon Key's shift to an event‑driven model replaces a tightly coupled monolith with a flexible, scalable system that securely manages home and business access.
Legacy System Pain Points
The original architecture linked services directly, creating a fragile web of dependencies that amplified failures and hampered updates.
- Manual routing logic caused bottlenecks during peak delivery windows.
- Loose‑typed events lacked version control, leading to ambiguous data contracts.
- Schema changes required coordinated releases across multiple teams.
- Limited subscriber capacity prevented growth of new delivery partners.
- Ad‑hoc SNS/SQS integrations added maintenance overhead.
Single‑Bus Multi‑Account Pattern
By centralizing EventBridge while allowing each team its own AWS account, ownership stays with developers and the infrastructure team governs the bus.
- Independent deployment cycles reduce cross‑team release friction.
- Central rules define routing, filtering, and target configurations.
- Cross‑account permissions enforce security boundaries.
- Uniform naming conventions simplify discovery and monitoring.
- Supports unlimited subscriber addition without redesign.
Schema Repository as the Source of Truth
A dedicated repository stores JSON schemas, enabling versioned contracts and automated documentation.
- Git‑backed storage provides audit trails for every schema change.
- Integration with Amazon EventBridge schema discovery keeps the registry current.
- Public OpenAPI style docs improve developer onboarding.
- Semantic relationships (inheritance, composition) are captured via <$ref> links.
- Two internal references service‑worker pattern guide and web interoperability guide.
Client‑Side Validation Library
Publishers validate events locally against the repository, receiving instant feedback and avoiding costly round‑trips.
- Typed SDKs generate validators for Java, Python, and JavaScript.
- Fails fast during CI/CD pipelines, catching contract breaches early.
- Configurable strictness levels allow gradual adoption.
- Extensible rule engine supports custom field checks beyond required‑field validation.
- Documentation includes best‑practice patterns for version upgrades.
Infrastructure Library for Subscriber Integration
Reusable constructs simplify adding new consumers to the event bus while preserving consistent policies.
- Pre‑built CDK constructs provision EventBridge targets with IAM roles.
- Automatic dead‑letter queue attachment safeguards against processing failures.
- Built‑in retry and backoff settings reduce duplicate handling.
- Metrics dashboards expose per‑subscriber health at a glance.
- Template supports both Lambda and container‑based consumers.
Operational Benefits and Future Extensibility
The new design improves reliability, lowers operational overhead, and positions Amazon Key for upcoming service extensions.
- Isolated failures no longer cascade across unrelated services.
- Schema versioning enables backward‑compatible evolution without downtime.
- Central governance allows rapid onboarding of third‑party delivery partners.
- EventBridge's native archive feature supports audit and replay scenarios.
- Framework can be expanded to include IoT devices and smart‑lock telemetry.