Build a Fanout Serverless Architecture using SNS, SQS, and Lambda
Build a Fanout Serverless Architecture using SNS, SQS, and Lambda

CLOUD LABS

Build a Fanout Serverless Architecture using SNS, SQS, and Lambda

In this Cloud Lab, you’ll learn how the fanout architecture works by creating an SNS topic and adding multiple SQS queues to it. You’ll then invoke Lambda functions using Amazon SQS.

8 Tasks

intermediate

1hr

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

Solid understanding of fanout architecture in SNS
Hands-on experience adding SQS queues as subscribers to a topic and configuring filter policies
Hands-on experience integrating Amazon SQS with Lambda functions
Hands-on experience building fanout architecture using SNS, SQS, and Lambda

Technologies
AWS logoAWS
SNS
SQS
Lambda
CloudWatch
Cloud Lab Overview

Amazon SNS is a serverless service that allows you to send and receive notifications. It uses the publish/subscribe model, where messages can be published to a topic and sent to all subscribers.

In a fanout architecture, any message published on an SNS topic is replicated and sent to multiple subscriber endpoints, which allows parallel asynchronous processing. This means a single message can be sent to different endpoints, such as SQS queues and Lambda functions, where it will be used for further processing.

In this Cloud Lab, you’ll see how the fanout architecture works in Amazon SNS. To do this, you’ll first create a topic using Amazon SNS and then create two Amazon SQS queues. You’ll add these queues as subscribers to your topic. After this, you’ll create two Lambda functions that will be invoked when your queues receive messages from the SNS topic. Finally, you’ll view your functions’ metrics in CloudWatch.

After completing this Cloud Lab, you’ll have a thorough understanding of the fanout architecture in Amazon SNS and will be able to filter the messages sent by it.

The following is the high-level architecture diagram of the infrastructure you’ll create in this Cloud Lab:

Architecture diagram
Architecture diagram

Cloud Lab Tasks
1.Introduction
Getting Started
2.Build the Fanout Architecture
Create a Topic
Create SQS Queues
Add Subscribers to the Topic
Create the Lambda Functions
Test the Fanout Architecture
3.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Trusted by 1.4 million developers working at companies including

Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg
Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

Get access to Educative Cloud Labs

Course Footer Image
Course Footer Image