You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
As serverless applications grow beyond single functions, you need architectural patterns to coordinate multiple services. This lesson covers three fundamental patterns — fan-out, choreography, and orchestration — along with practical implementations using AWS services.
A single Lambda function responding to an API Gateway request is straightforward. But real-world applications require:
The patterns in this lesson address these challenges.
Fan-out distributes a single event to multiple consumers for parallel processing.
+---> Lambda A (resize image)
|
Event (S3 upload) --+--> Lambda B (extract metadata)
|
+---> Lambda C (virus scan)
|
+---> Lambda D (update database)
SNS is the simplest fan-out mechanism — publish once, deliver to many:
# SAM Template
Resources:
OrderTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: order-events
SendConfirmationFunction:
Type: AWS::Serverless::Function
Properties:
Handler: src/sendConfirmation.handler
Events:
OrderPlaced:
Type: SNS
Properties:
Topic: !Ref OrderTopic
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.