download free 30 days trial version buy bucket explorer
Documentation  Download  Purchase  Support  FAQs   Forum   ScreenShots & Demos

AWS SNS - Create a Topic to Publish Notifications (CreateTopic)

To enable Notifications on Amazon S3 Buckets for sending event driven Notifications to clients using Simple Notifications Srvice (SNS), you will need to create an "SNS Topic". A Topic allows you to define a subject or an event type that you want to publish notifications for. Also, the clients who are interested in receiving notifications for the Topic can either directly subscribe to the Topic or the Topic Owner can subscribe them to the Topic. The Topic becomes a channel for Publishers and Subscribers to communicate with each other.

Bucket Explorer provides an easy interface for Simple Notification Service (SNS) to create, subscribe, publish, and view all notification topics. Along with these operations, you can also add/remove permissions on topic, list all subscriptions of topics, and get attributes of the topic.

Create Topic

A topic provides an access point for publishers and subscribers to send messages and subscribe to notifications. You can create up to 100 topics. To create a Topic you need to provide a name and that name will be used to create Amazon Resource Name (ARN).

Syntax:



http://sns.us-east-1.amazonaws.com/
?Name=My-Topic
&Action=CreateTopic
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-03-31T12%3A00%3A00.000Z
&AWSAccessKeyId=(AWS Access Key ID)
&Signature=gfzIF53exFVdpSNb8AiwN3Lv%2FNYXh6S%2Br3yySK70oX4%3D
 

Create Topic using Bucket Explorer

While the "CreateTopic" API of AWS allows you to "Create Topic" by writing code, Bucket Explorer lets you do that without writing even a single line of code.

   Steps to create notification topic:

  1. Start Bucket Explorer and connect with your Amazon S3 account – which is subscribed for the Simple Notification Service.
  2. Go to Add-Ins -> Notification Service .
  3. By default, you will get a list of all existing topics of US Region at the right side of “Notification Service” panel.
  4. If you want to change location, choose it from the dropdown list that contains all the regions.
  5. If no topics have been listed, you need to click on “Create Topic” button.
  6. Specify valid topic name on “Create Topic” panel and click on “Create” button.
  7. You will get a confirmation message after topic has been created successfully.

Subscribe Topic

Using Subscribe Topic option, you can subscribe an endpoint. You have to subscribe the topic to receive messages published to a topic. A confirmation message will be received at the specified end-point. The end-point can be SQS ARN, URL, email address, phone number, etc.

Syntax:



http://sns.us-east-1.amazonaws.com/
?TopicArn=arn%3Aaws%3Asns%3Aus-east-1%3A123456789012%3AMy-Topic
&Endpoint=example%40amazon.com
&Protocol=email
&Action=Subscribe
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-03-31T12%3A00%3A00.000Z
&AWSAccessKeyId=(AWS Access Key ID)
&Signature=1%2FeGaDphxXq%2Fa89x6HvKh%2Fc1yLGXzuhS7vS2MslToDM%3D
 

Subscribe Topic Using Bucket Explorer

While the "Subscribe" API of AWS allows you to "Subscribe Topic" by writing code, Bucket Explorer lets you do that without writing even a single line of code.

Steps to subscribe notification topic:

  1. Select the topic from the list of all topics of a specific region at the right side of “Notification Service” panel.
  2. Click on the “Subscribe Topic” button. It will show a new panel “Subscribe Notification Topic Panel” .
  3. You can see the topic that you have selected. If you want to change the topic, you can change it from the dropdown list.
  4. Select “Protocol” and respective “End Point” .
  5. If you have specified HTTP/HTTPS protocol, confirmation message will be delivered to a specified URL over “End Point” .
  6. If you have specified Email and Email-JSON protocol, you will get a confirmation message on your specified Email ID at “End Point” .
  7. If you have specified SQS, Amazon SNS will en-queue to the specified queue at “End Point” .
  8. Click on “Subscribe” button and you will get a confirmation message.

Publish Topic

Publish sends specified messages to all the subscribed endpoints of a topic. When topic owners wish to notify subscribers about the updates, they publish those messages. This is also called the send out notifications.

Syntax:

The following example publishes the same message to all protocols:


http://sns.us-east-1.amazonaws.com/
?Subject=My%20first%20message
&TopicArn=arn%3Aaws%3Asns%3Aus-east-1%3A698519295917%3AMy-Topic
&Message=Hello%20world%21
&Action=Publish
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-03-31T12%3A00%3A00.000Z
&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE
&Signature=9GZysQ4Jpnz%2BHklqM7VFTvEcjR2LIUtn6jW47054xxE%3D

Use the following JSON object format for the Message parameter to send different messages to each protocol (linebreaks added
for readability):
{
"default" : "some message",
"email" : "some email message",
"email-json" : "some email-json message",
"http" : "some http message",
"https" : "some https message",
"sqs" : "some sqs message"
}
 

Publish Topic using Bucket Explorer

While the "Publish" API of AWS allows you to "Publish Topic" by writing code, Bucket Explorer lets you do that without writing even a single line of code.

Steps to publish notification topic:

  1. Select a topic from the list of all the topics of a specific region at the right side of “Notification Service” panel.
  2. Click on the “Publish Topic” button.
  3. It will show a new panel as “Publish Message panel” .
  4. You can see the topic that you have selected. If you want to change the topic, change it from the dropdown list but make sure that the topic you choose from the dropdown list must have been subscribed.
  5. Type the Subject (optional) and Message to be published.
  6. Click on the “Publish” button and you will get a confirmation message.