Since 2010, Amazon Web Services has included a notification service called Amazon Simple Notification Service. It offers a cheap infrastructure for sending messages in bulk, mostly to mobile consumers. In this article, we will discuss more SNS, AWS SNS, the clients involved in SNS, and various types of AWS SNS. We will also put some light on the benefits of SNS and the working of SNS message filtering.
It is defined as a service on the web that facilitates the management, setup, and cloud notification sending. It gives programmers the incredibly flexible, affordable, and scalable capacity to post messages from one app and transmit them to other apps. Publishers and subscribers, often called consumers and producers, are the two categories of users in Amazon SNS.
By creating and then sending a message, serving as the main entry point and a communication channel, publishers engage in asynchronous communication with subscribers. The notification or a message is consumed or received by subscribers (email addresses, Lambda functions, web servers, Amazon SQS queues) via one of the standard protocols ( HTTP/S, Amazon SQS, email, SMS, AWS Lambda).
We have the perfect professional AWS Training course for you. Enroll now!
The two main clients of Amazon SNS are given below:
The message is sent by the publisher to an SNS topic they have made. Since the subject itself identifies the subscribers linked with the topic that the publisher has formed and then delivers that message to subscribers, it is not necessary to specify the address of the destination when publishing the message.
The paradigm between the publisher and the subscriber is used by AWS SNS to transmit messages from its destinations. A user is able to work with Amazon SNS for filtering the messages so that they are sent to more destinations or subscribers with the help of email, SMS, as well as mobile communications.
An explanation of the various actions taken by AWS SNS is provided below.
The precise workflow stages used by AWS SNS are detailed below:
The messages that need distribution of various subscribers are filtered out using SNS Topics. As a developer of AWS, a user must first construct the SNS serving as the subscribers' accessing location. The subscribers are able to choose to receive the text notifications on a certain topic by making use of the topic.
The SNS messages enter the message filter after being detached using topics, where they are then further filtered according to the subscriber's chosen policy. After reviewing the policies and obtaining permissions, the emails finally reach the appropriate subscribers.
Application and system alerts are automated user alerts that are delivered to particular users via email or SMS when certain criteria are reached.
Text messaging or push email are 2 main methods for enabling the communication with different people or various groups such as newspaper subscribers get notifications about news
Mobile apps receive direct messages via mobile push notifications such as pop up notifications for any application that is being installed.
Want to know more about AWS ,visit here AWS Tutorial !
Messages are stored by the Amazon SNS in cross-region AWS availability zones. Every message has become simultaneously accessible across several locations, offering excellent reliability. Publishers can send messages anywhere at time due to the worldwide network of data centres that AWS possesses.
By eliminating your message filtering system as well as message routing, you can streamline the overall architecture of messaging with the help of Amazon SNS. The SNS handles message filtering so that users only receive messages that are relevant to them rather than all of the published messages inside the subject of SNS.
A person is able to dynamically scale the quantity of message requests coming from any application using the Amazon SNS service. To provide this benefit, Amazon SNS uses the AWS cloud platform's scaling capabilities.
In addition to having automated scaling, Amazon SNS is built for maximum bandwidth and shifting traffic patterns. Utilising capacity planning and provisioning, you may organise the workload with Amazon SNS. Additionally, there are no upfront costs or software installations required.
A user can establish topic-related policies that outline the kind of network protocols as the owner of an SNS subject. Users can also publish as well as subscribe to a certain topic which is very specific. The daily message limit and the confidentiality and security of communications for "one-time password" (or OTP) transactions are further security features.
The servers in this network include:
To setup message filtering on Amazon SNS service, follow these 6 steps
For publishing the messages for a request of the user submitted on the site, the very initial step is to build the Amazon SNS subject.
This step will be connected to the SNS subject and must first be created. The backend servers of the website poll the associated SQS message queue for user requests. In this instance:
Subscribing the freshly built queues in SQS for broadcasting the SNS messages, the following step will be performed.
We'll subscribe all the 3 queues to the topic "Topic 1" for an example.
Select "Topic 1" from the list of possible topics by clicking Topics in the Amazon SNS console.
You may now examine the SQS queues subscribing to this subject from the "Topic 1" information page. A sample screen is seen below.
Click "Publish a message" on "Topic 1" page on the SNS dashboard.
Fill out the "Publish message’ page with the information for the message below.
Message subject is contained in the subject field, which is optional.
Post your initial message.
Follow the same procedure as before to add 2 more new messages described as Message #2 as well as Message #3 having the same specifications. Set the Value property for both the messages to "type 2."
The following step is to confirm that the new messages are being forwarded using the policy for message filtering to the appropriate SQS queue.
Choose your queue and then Queue Actions followed by View/ or Delete Messages from the Amazon SQS console.
To begin receiving the messages, click "Start Polling for Messages."
For the remaining lines, repeat the previous procedure.
Top 30 frequently asked AWS Interview Questions !
Conclusion
You can send the appropriate messages to endpoints or subscribers by using Amazon SNS. It is a scalable and highly available service for pushing messages to microservices, distributed applications, as well as server less apps using the publisher-subscriber approach.
Related Articles
Batch starts on 1st Apr 2023, Weekend batch
Batch starts on 5th Apr 2023, Weekday batch
Batch starts on 9th Apr 2023, Weekend batch
.