
Configure credentials and region for AWS using Python and boto3, then set up macOS, Windows, or Linux with PyCharm and virtual environments for SQS and SNS development.
Install python 3.6 and pip from python.org on Windows, customize the setup to include pip and add python to PATH, then verify the installation in the command prompt.
Install Python 3 and the Python package manager on macOS from Python.org, configure path and shell integration, and verify Python 3.6 and pip3.6 in the terminal.
Install aws cli on macOS with homebrew to avoid path issues and configure access keys for command-line access to AWS resources.
Set up a PyCharm project with Python 3.6, create a src package and two files, import boto3, and define a function to get an AWS SQS client in eu-west-1.
Create an SQS queue using a boto3 client by specifying the queue name; attributes are optional, with defaults applied when omitted, and the code prints the queue URL.
Create a dead-letter queue and bind it to the main queue in AWS SQS, configuring the read-write policy and max receive count for failed messages.
Learn how to purge an SQS queue by calling the purge queue method with the queue URL, deleting all remaining messages and verifying via the AWS console.
Create an sns topic with boto3 in python by configuring the sns client for eu-west-1 and calling create_topic with a topic name. Check the topic in the aws console.
Learn to fetch and list AWS topics using Python, leveraging list notation and next tokens for pagination, then filter and process the topics with loops.
Retrieve topic attributes for an SNS topic using boto3 by calling get_topic_attributes with the topic ARN, and view default attributes like policy and principal actions returned by AWS.
update a topic's attributes with the aws sns client by specifying the topic and attribute name, then set a new value such as display name. verify the update in console.
Create email subscriptions to an SNS topic using boto3 in Python, by defining a subscribe call with topic and email protocol, handle pending confirmation, and confirm to start receiving notifications.
Learn how to get topic subscriptions and list subscriptions by topic for sns topics using boto3 in aws.
Explore how to opt in a phone number back to your AWS SNS subscription list, with a once-a-month opt-in limit and a simple opt-in phone number method.
SQS is the very first service of AWS when it was launched in 2006.
SNS is the best way to transmit notifications and messages to either SMS, Email, SQS Queue or even other applications on AWS!
Join me in this course to learn ins-and-outs of SQS Simple Queue Service and SNS Simple Notification Service from AWS!
Let’s take a closer look at what we’re going to cover in this course step-by-step.
In this course, we’ll start of with what we’ll build throughout the course and what you need to have on your computer to follow along with me.
Don’t worry; I’ll explain everything you need very clearly and I’ll show you what you need to install and setup on your computer to work with S3. There will be two different sections for Windows and MacOS users. These sections are basically identical and show how you can prepare your computer environment to be ready to work with S3! I’ll show you how to install Python, Boto3 and configure your environments for these tools. I’ll also show you how you can create your own AWS account step-by-step and you’ll be ready to work AWS in no time!
When we’re done with preparing our environment to work AWS with Python and Boto3, we’ll start implementing our solutions for AWS.
We’ll first start off with SQS Simple Queue Service and create our very first Queue on AWS. After getting our feet wet with the API, we’ll learn how we can create FIFO or First-In-First-Out Queues on SQS! Next up is Dead-Letter Queues. Dead-Letter Queues add another layer of resiliency to your applications and helps you maintain them healthy even if your main queue is not available to process the messages. So we’ll learn how we can create ourselves a Dead-Letter Queue and then bind to our Main Queue to allow messages to keep coming in case of a failure. Then we’ll learn how to operate operations on SQS Queues like retrieving configurations updating them and so on.
Next up is the message operations on SQS! We’ll learn from publishing single messages to batch messages to our SQS Queues! Once we learn how to send them, we’ll implement Polling solution for retrieving and reading the queued messages from AWS! Then we’ll learn how to process these messages and eventually learn how to delete them from SQS once we’re ready. After that, we’ll see how to update the visibility window of messages by manipulating message visibility timeouts. And lastly, we’ll learn how to completely wipe the queue by purging it and you’ll see how easy it is!
Next stop is SNS Simple Notification Service! We’ll start by creating SNS Topics and build upon that by learning to implement operations on SNS Topics for managing them. For example, we’ll learn how to retrieve information about SNS Topics, update their configurations and eventually delete them.
Most important part of SNS comes along and that is Subscriptions! With SNS Topic Subscriptions, you can literally subscribe anything to your Topic and publish notifications and messages to them.
We’ll start by implementing an Email Subscription to an SNS Topic. And we’ll learn to confirm the SNS Topic Subscription from the received email of AWS Notifications. Next is to learn SMS Subscriptions for SNS Topics. I’ll subscribe my number and show you how easy it is to subscribe anyone to your SNS Topic! We’ll also learn to implement how to subscribe an SQS Queue to an SNS Topic. Once we’ve done that, we’ll learn how we can check opted-out subscribers by filtering and listing them. Then we’ll learn the way to opt-in a SMS subscriber back into our SNS Topic Subscription!
And when we implement all this, we’ll move on with learning to publish messages to our SNS Topic Subscribers! We’ll subscribe an Email, SMS number and a SQS Queue in the same time and then publish a message to our SNS Topic! Once we do that, we’ll verify that we receive the subscription notification from Email, SMS and SQS Queue! That’s a huge benefit of SNS Topic Subscriptions and I highly recommend you to make use of it in your applications and sevices!
Again, SQS and SNS are amazing services from AWS and there are hundreds of ways you can make use of them. Let’s not lose more time and jump right into the implementation with SQS and SNS so I’ll see you in the course!