Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Simple Notification Service to http endpoint

Tags:

amazon-sns

I want to send message from Amazon Simple Notification Service(SNS) to the http endpoint. There is no proper solid documentation on how to do that. Though I had read Amazon SNS documentation still I could not get entire picture. Can anyone give me simple example on how Amazon SNS and http endpoint work together?

like image 643
Mat Avatar asked Aug 03 '16 18:08

Mat


1 Answers

There good documentation for what you asking: http://docs.aws.amazon.com/sns/latest/dg/sns-dg.pdf

Look at the page #147, it describes what steps you need to do for sending messages to HTTP(s) endpoint.

Also check this example which describes how to create topic, subscribe endpoint, confirm subscription and start to receive notification messages from SNS (uses Java SDK): https://github.com/mfine/AmazonSNSExample

General picture is:

On the publisher side:

  • create topic and subscribe some endpoint to receive messages. After subscribing endpoint to topic, the endpoint will receive SubscriptionConfirmation message.

  • start publish to topic so your endpoints will receive notification messages

On the subscriber side (your endpoint should be able to handle at least confirm subscription request and notification messages):

  • confirm subscription: make HTTP GET request to the "SubscribeURL" URL which comes inside the body of the confirm subscription request. Before you confirm subscription your endpoint will not receive any messages from SNS
  • receive notification messages and do what you want
like image 146
WelcomeTo Avatar answered Nov 19 '22 02:11

WelcomeTo