Handling Amazon SNS Notifications with AWS Lambda

Handling Amazon SNS Notifications with AWS Lambda
Handling Amazon SNS Notifications with AWS Lambda

CLOUD LABS



Handling Amazon SNS Notifications with AWS Lambda

In this Cloud Lab, we’ll create an SNS topic and publish messages using a Lambda function. We’ll also add multiple subscribers to the topic. We’ll schedule the Lambda function invocation using AWS EventBridge.

10 Tasks

beginner

1hr 30m

Certificate of Completion

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

Learning Objectives

A solid understanding of Amazon SNS and its core features
Hands-on experience adding subscribers to a topic and configuring filter policies
Hands-on experience publishing messages to a topic through a Lambda function
Ability to invoke Lambda functions using Amazon EventBridge

Technologies
Lambda logoLambda
EventBridge logoEventBridge
SQS logoSQS
SNS logoSNS
Cloud Lab Overview

Amazon SNS is a serverless service that allows us 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 this Cloud Lab, you’ll create an SNS topic and publish messages to it by creating a Lambda function. You’ll also add two subscription endpoints—an email and an SQS queue—to the SNS topic. You’ll learn to filter the messages sent to subscriber endpoints by adding a filter policy. Finally, you’ll create a schedule using Amazon EventBridge to invoke the Lambda function.

After completing this Cloud Lab, you can create an SNS topic and add subscribers to it. You can also filter messages that have been sent to subscribers and invoke Lambda functions using EventBridge.

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

Cloud Lab Tasks
1.Introduction
Getting Started
Create an SNS Topic
2.Lambda Function and Access Policies
Create a Reminder Function
Configure an SNS Topic
3.Add Subscribers to the Topic
Add an SQS Subscriber
Add an Email Subscriber
4.Putting It All Together!
Schedule and Invoke the Lambda Function
Test the Lambda Function
5.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.

Before you start...

Try these optional labs before starting this lab.

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.

Hear what others have to say
Join 1.4 million developers working at companies like