June 19 , 2025
Author : Biswash Giri
The word itself is clear by event driven which means to react to any event that occurs with a response. This is possible by using the AWS services that is EventBridge service which is a managed service to redirect events between different services and applications. In the Event driven architecture one service provides an event and another service reacts to that event.
To understand how a event-driven architecture works we will be using the AWS lambda and EventBridge service provided by AWS. This implementation is a basic level understanding which will be easier to understand.
There can be different use cases but to understand how it works we can see in the simple use case that is when a user registered into a company the event is published. This event can trigger multiple actions independently such as sending a welcome email after he is registered, logging the registrations where each actions can be handled by a separate lambda function.
The event producer, which is an application or service, produces an event, and then the eventbridge matches the event against the rules then it triggers the Multiple AWS Lambda functions. The whole process is also logged for monitoring as well with CloudWatch for monitoring and logs.
Image : EventBridge triggering multiple Lambda functions
Here we are implementing the service EventBridge so that it will be easier to add new consumers without changing any existing code with better error handling and a good scaling factor. It also makes the services loosely coupled.
Also, Implementing the Monitoring with cloudwatch helps to see the invocation metrics as well as the failed executions while alowing users to debug the logs after analyzing it.
To implement the simple event driven architecture you can follow the steps below as a hands-on practice
{
"source": "myapp.users",
"detail-type": "UserSignedUp",
"detail": {
"userId": "12345",
"email": "user@example.com",
"signupMethod": "email"
}
}
Here the source is wh produced the event , detail-type is the type of event that is produced which is used for routing and at last the detail is the actual event data.
Now you need to create the EventBridge rule that matches this event. If the source is myapp.users and detail-type is UserSignedUp then route the trigger to Lambda function. This is possible either by IAC or through the GUI AWS console itself.
The Lambda function you create now is the one that reacts to the event that happened. For example when a user signup then the welcome email is sent.
Example Lambda Code, which is written in Python
def lambda_handler(event, context):
user_id = event["detail"]["userId"]
email = event["detail"]["email"]
print(f"New user signed up: {user_id}")
print(f"User email: {email}")
return {
"statusCode": 200,
"message": "User signup event processed"
}
The above Lambda code receives the event from the eventbridge then it gets the user information after that it performs an action which is logging , doing email or any analytics work.
Once you have set up the above one Lambda, then you can again add any other multiple Lambda like the above is set to send email then you can setup another for auditing also next for analytics. You can work on independent lambda functon without interfering the other functions.
The feature provided by AWS which is Event-driven architecture using Eventbridge and conbining Lambda is a simple understandable implementation yet powerful solution to build scalable serverless systems. This is a beginner friendly implementation so that if you need a basic experice of using the serverless services from AWS you can follow the steps provided and add more features to the system.