Create notifications in minutes with Amazon SNS and Python

Ramon Marrero
Analytics Vidhya
Published in
4 min readApr 26, 2021

--

Learn how to use Amazon SNS to create email and phone notifications with Python.

Introduction

AWS describes Amazon Simple Notification Service (Amazon SNS) as a fully managed messaging service for both application-to-application and application-to-person communication. Amazon SNS allows us to distribute messages to a large number of subscriber systems, this includes many AWS services such as AWS Lambda functions, Amazon SQS queues, HTTPS endpoints, and Amazon Kinesis Data Firehose.

In this post, you will learn how to use Amazon SNS to create email and phone notifications with Python. You will learn how to create a topic, subscribe to a topic, send email notifications using this topic, and delete a topic.

Photo by Christopher Gower on Unsplash

Create an Amazon SNS topic

The initial and most common Amazon SNS task is to create a topic. An Amazon SNS topic is a logical access point that acts as a communication channel, letting us group multiple endpoints, such as Lambda functions, Amazon SQS queues, HTTPS endpoints, and Amazon Kinesis Data Firehose.

To create a SNS topic, we will use the Python AWS SDK or boto3 library. You use the Boto3 to create, configure, and manage AWS services.

--

--

Ramon Marrero
Analytics Vidhya

Head of Data Engineering | AWS Community Builder | AWS Certified Solutions Architect | Google Cloud Certified Professional