Publish and Subscribe with Amazon SNS and SQS
Create SNS topics and SQS queues to publish messages and build a fan-out messaging pattern on AWS

Lab overview
Modern distributed applications rarely operate as a single monolithic process; they are composed of independent components that need to communicate reliably. Amazon Simple Notification Service (SNS) and Amazon Simple Queue Service (SQS) are two foundational AWS messaging services that solve this communication challenge. SNS implements the publish-subscribe pattern, where a single message published to a topic is automatically delivered to all subscribers, while SQS provides durable message queues that decouple producers from consumers and guarantee message delivery even when downstream systems are temporarily unavailable.
When combined, SNS and SQS enable the fan-out pattern, one of the most powerful messaging architectures in cloud computing. A single SNS notification can simultaneously deliver messages to multiple SQS queues, email addresses, and other endpoints, allowing parallel processing without the publisher needing to know anything about its consumers.
In this lab, you will create an SNS topic, add an email subscription, create an SQS queue, subscribe the queue to the topic, publish messages, and poll the queue to observe the fan-out pattern in action.
Objectives
By completing this beginner lab, you will be able to:
- Create an Amazon SNS topic and configure an email subscription
- Create an Amazon SQS standard queue with appropriate settings
- Subscribe an SQS queue to an SNS topic to enable fan-out messaging
- Publish messages to an SNS topic and verify delivery to multiple subscribers
- Poll and retrieve messages from an SQS queue
Who is this lab for?
This lab is designed for:
- Cloud beginners who want to understand messaging and event-driven patterns on AWS
- Developers and architects looking to learn the fundamentals of SNS and SQS before building decoupled systems
Basic familiarity with the AWS Management Console is recommended.
Verified against your live environment
An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed — not multiple choice, real-world proficiency.
More labs like this
Deploy Amazon EC2 Instance in AWS Cloud
Deploy Amazon EC2 Instance in AWS Cloud in this hands-on lab.
Create and Deploy a REST API with Amazon API Gateway
Build a REST API using API Gateway with Lambda proxy integration, configure CORS, deploy to a stage, and test endpoints with curl.
Terraform Complex Types and Dynamic Expressions on AWS
Define complex variable types, use for_each and count for resource iteration, apply splat expressions and dynamic blocks on AWS with Terraform.
Environment
Every lab includes
- Real environment, pre-credentialed
- Automated checks on every step
- Isolated sandbox, auto cleanup
- AI-recommended next steps
Lab curriculum
- 01
Signing into AWS Console
- 02
Creating an SNS Topic and Email Subscription
1 automated check
- 03
Creating an SQS Queue and Subscribing to the SNS Topic
2 automated checks
- 04
Publishing Messages and Observing the Fan-Out Pattern
1 automated check
Skills validated
Not the lab you were looking for?
Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.