Open In App

How To Install AWS CLI – Amazon Simple Notification Service (SNS)?

Amazon Simple Notification Service (SNS) is used for the Application to Application (A2A) and Application to Person (A2P) communication. It provides developers with a highly scalable, flexible, and cost-effective capability to publish messages from an application and immediately deliver them to subscribers or other applications. Using AWS Console it is easy to publish messages to your endpoint of choice (HTTP, SQS, Lambda, mobile push, email, or SMS) and edit topic policies to control publisher and subscriber access.

Advantages of SNS:

  1. Immediate, push-based delivery
  2. Easy for integration
  3. Flexible message delivery using protocols
  4. It supports FIFO topics

Steps to create AWS SNS Service:

The below Steps are related to AWS E-mail SNS Service.



$ aws sns create-topic 
--name gfg-topic

 

 

$ aws sns subscribe --topic-arn arn:aws:sns:us-west
-2:123456789012:gfg-topic --protocol email 
--notification-endpoint example@example.com

 

 



$ aws sns publish --topic-arn 
arn:aws:sns:us-west-2:123456789012:
gfg-topic --message "Hello Geeks"

 

 

                 

$ aws sns unsubscribe --subscription-arn
 arn:aws:sns:us-west-2:123456789012:
 gfg-topic:1328f057-de93-4c15-512e-8bb22EXAMPLE

 

$ aws sns delete-topic --topic-arn
 arn:aws:sns:us-west-2:123456789012:gfg-topic

 

 

Article Tags :