Serverless Developer Guide
Decoupled event-driven architecture
For simpler applications, the advantage of event-driven versus request-driven applications may not 
be apparent. But, as your applications add more functionality and handle more traﬃc, the value 
becomes clear.
Event-driven applications rely on communication through events that are also observable by other 
services and systems. Event producers are unaware of which (if any) consumers are listening. This 
strategy makes it easier to extend and scale, without disrupting existing work ﬂows.
For example, API Gateway can enforce rate and volume limits for requests to your API on a per-
customer basis. Or, a service could watch the inbound query parameters to create a list of popular 
product searches. The database could send events when products are added to the cart, to feed to 
a predictive ML algorithm for ordering supplies.
Due to the loose coupling between components of an event-driven system, your compute 
functions are not even aware of these other activities. You can scale components independently. 
One service can fail, without impacting other services. Events can be ﬂexibly routed, buﬀered, and 
provide a log for audit.
Let’s revisit the diagram with various services connected through events. We can start to see now 
that it is actually not as complex as it might have appeared.
Think of it like looking down on a big city with messengers moving packages and letters between 
people and businesses. The sources and destinations range from the suburbs to the city core. 
Inbound requests could be managed by a dispatcher, like API Gateway, Lambda Function URLs, or 
Amazon EventBridge. Or, some messages might be dropped in a box for asynchronous delivery. 
This would be like events routed to queues or orchestrated in complex work ﬂows with Step 
Functions. The monitoring, tracing, and metrics services, CloudWatch and AWS X-Ray, are like 
managers, watching the a stream of events to make sure packages are delivered, and if not, to 
troubleshoot the problem. After drop-oﬀ at a business, some packages are transferred by in-house 
delivery agents to their ﬁnal destination. This situation is similar to how services that store data 
and ﬁles, may stream events to compute services, which triggers ever more actions.
Decoupled event-driven architecture 27