When it comes to building and deploying microservice applications on AWS, there are 2 emerging best practices: use a separate AWS account per application (and environment) and decouple communication between separate systems using events (instead of point-to-point communication). Can we use these two best practices together? Yes, but we will need to find a way to pass messages between AWS accounts! In this episode we discuss how to do that using EventBridge as a cross-account event backbone! We discuss why these 2 suggestions are well established best practices, what are the pros and cons that they bring to the table, what an event backbone is and why EventBridge is a great service to implement one. Finally, we will discuss a case study and an example implementation of this pattern in the context of an e-commerce application built with a microservices architecture.
In this episode we mentioned the following resources:
- Article “How to use EventBridge as a Cross-Account Event Backbone”
- Repository with example code
- Article “What can you do with EventBridge?” (fourTheorem blog)
- For great ideas on structuring event payloads, take a read of Sheen Brisals' post on the Lego Engineering blog
- Article “What do you need to know about SNS?” (fourTheorem blog) which includes a comparison of SNS and EventBridge
- AWS Bites Episode 23: “What’s the big deal with EventBridge?”
- AWS Community Day talk by Luc van Donkersgoed “Event-Driven Architecture at PostNL Scale”