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

AWS SNS - Enable/ Disable Notifications for a Amazon S3 Bucket (PUT Bucket Notification)

Enable or Disable SNS Notification on Amazon S3 by sending HTTP PUT Request

You can enable or disable notifications of specified events for an Amazon S3 Bucket by sending HTTP PUT Request to Amazon S3 Server. Currently, Amazon S3 supports notification for s3.ReducedRedundancyLostObject event, which is triggered when Amazon S3 loses all replicas of an S3 object . You must be the Bucket owner to configure notifications on a Bucket. As a Bucket owner, you can also grant permission to other users to set the configuration by using a Bucket policy grant.

By default, if the owner of the Bucket and Amazon SNS topic is the same, Bucket owner can publish notifications to the topic. Owner can also turn off notifications on a Bucket.

You can Enable/ Disable SNS Notification on a Bucket by either using Amazon S3 APIs by writing your own software program, or by using the Bucket Explorer user interface for configuring notifications with Point-and-Click.

Following sections explain how you can use Amazon S3 REST APIs in your code. You can read more on AWS Documentation site about S3 SOAP APIs. 

Add/Remove S3 Bucket Notification using Amazon REST API

To configure notifications on S3 Bucket, you can request PUT Bucket notification. You will need to pass Bucket Name, Notification Configuration xml and Request headers that are common to all operations for that.

To remove notification on a Bucket, you will need to specify <NotificationConfiguration/> empty tag.

Syntax - Add Notification


PUT /?notification HTTP/1.1
Host: BucketName .s3.amazonaws.com
Date: date
Authorization: signatureValue

<NotificationConfiguration>
<TopicConfiguration>
<Topic> TopicARN </Topic>
<Event> Event </Event>
</TopicConfiguration>
</NotificationConfiguration>
 

Syntax - Remove Notification


PUT /?notification HTTP/1.1
Host: BucketName .s3.amazonaws.com
Date: date
Authorization: signatureValue
<NotificationConfiguration/>
 

Add/Remove S3 Bucket Notification using Bucket Explorer

You can use Bucket Explorer User Interface to configure SNS notifications on S3 Bucket with point and click, instead of having to write any code.

How to Add Notification on S3 Bucket?

add notifications on s3 bucket
Using Bucket Explorer, you can now configure S3 Bucket to send a notification through Simple Notification Service when an RRS object in that Bucket is lost.

To enable notification on S3 Bucket, we need to have a topic with same region.
Click here to create a topic


Steps to add notifications on S3 Bucket:

  1. Start Bucket Explorer and connect with your Amazon S3 account - which is subscribed for the Simple Notification Service.
  2. Select any S3 Bucket on which you want to add notification.
  3. Right click on the selected Bucket and choose Notifications -> Add Notification option.
  4. A window will open for Add Notification.
  5. Select your “Topic” and “Event” from the drop down list and click on “Add” button.
  6. You will get a confirmation message after the notification has been added successfully.
disable notifications on s3 bucket

Steps to disable notifications on S3 Bucket:

  1. Select any S3 Bucket on which you want to disable notification.
  2. Right click on the selected Bucket and choose Notifications -> Disable All Notifications option.
  3. It will ask you to confirm before disabling all notifications.
  4. Click on “Yes” if you want to continue and you will get a confirmation message after disabling all notifications successfully.