When building SaaS applications, one of the hardest challenges is managing resources across multiple tenants. Each tenant has its own CloudFormation stacks, databases, and lifecycle events. Over time, keeping track of all these moving parts can become overwhelming.
So how do you simplify this without writing endless orchestration code?
By Using Serverless Event Router: Amazon EventBridge
Why EventBridge Works Well for SaaS
EventBridge is like the “post office” for your AWS events or your custom events in custom event bus. Services publish events (like “Stack created” or “Resource updated”), and EventBridge makes sure those events reach the right consumers.
Here’s why it’s powerful in a SaaS world:
-
Event Filtering: Tenants only get events that matter to them.
-
Event Enrichment: Add tenant metadata to events before they’re processed.
-
Built-in Integrations: Many AWS services already send events—no custom wiring needed.
Let’s Imagine a Typical SaaS Challenge
Imagine this:
-
Tenant resources are to be provisioned with AWS CloudFormation.
-
The Resource details need to be tracked and stored in DynamoDB.
-
Updates and deletions must trigger notifications and cleanups.
Using of Step Functions works for the first provisioning, but what about the day-to-day updates?
This is where EventBridge shines.
How EventBridge Helps
With EventBridge rules and patterns, you can react to events like these:
-
CREATE_COMPLETE→ Store resource info in DynamoDB. -
UPDATE_IN_PROGRESS→ Notify services to adjust. -
DELETE_COMPLETE→ Clean up metadata.
Only the events you care about trigger actions—no wasted processing.
Below is an example for serverless configuration:
ResourceCreateRule:
Type: AWS::Events::Rule
Properties:
Name: resource-for-tenant
Description: "Triggers when resources for CloudFormation stack is successfully created"
EventPattern:
source:
- "aws.cloudformation"
detail-type:
- "CloudFormation Stack Status Change"
detail:
stack-id:
- prefix: If any context was prefixed to the cloudformation
status-details:
status:
- "CREATE_COMPLETE"
Targets:
- Arn: Arn of the Lambda
Note: Remember to add permission to the lambda where the principal is eventbridge who can invoke the lambda which can process and store the data into databases.
Benefits of This Approach
-
Simplified Architecture – Less custom orchestration code.
-
Scalability – The event-driven design grows naturally with the number of tenants.
-
Clear Visibility – DynamoDB (or another data store) becomes the source of truth for tenant resource tracking for auditing.
-
Asynchronous Processing – Operational tasks can run in the background without impacting tenants.
Looking Ahead
By combining EventBridge with other AWS services, it’s possible to design SaaS systems that are both reactive and scalable. Some possibilities include:
-
Automating cross-service actions (E.g. triggering notifications or workflows on resource changes).
-
Separating operational and tenant-facing events with multi-bus architectures.
-
Leveraging event replay and archiving for debugging or compliance
Where do you think EventBridge could simplify processes in the architecture?
Resources:
-
Cloudformation status codes for Stack Operations: StackSets concepts - AWS CloudFormation
-
Eventbridge Patterns: Creating Amazon EventBridge event patterns - Amazon EventBridge
