top of page

AWS SNS (Simple Notification Service)

  • Writer: Parag
    Parag
  • Oct 9, 2020
  • 2 min read

Updated: Jul 29, 2021

Integration of SNS service with S3 service.


Step 1: In AWS console search for SNS service. In SNS console under Create topic give Name as MyTopic. Click on Next Step.

ree

Give Display name: MyDisplay

ree

Scroll down and open the Access Policy – optional drop down.

Under Define who can publish messages to this topic click on Everyone radio button.

Under Define who can subscribe to this topic click on Everyone radio button.

ree

Click on Create topic in bottom right corner.

ree

Confirm the creation of this topic in SNS Console.

ree

Step 2: Click on the created topic MyTopic. Scroll to Subscriptions. Click on Create subscription.

ree

Under Details select Protocol: Email-JSON and in Endpoint provide e-mail ID of subscriber. For testing purposes preferably your own e-mail ID.

ree

Click on Create subscription.


Step 3: Go to the endpoint e-email Inbox. An email is received to confirm the subscription. Click on the provided SubscribeURL.

Check in the SNS Console Subscription. The status will display Confirmed.

ree

Step 4: Go to Amazon S3 services and click on Create bucket.

ree

Provide bucket name as bucketforsns and click on Create.

ree

Upload 2 images inside the bucket.

ree

Step 5: Go to the Properties of this bucket. Scroll down and select Events.

ree

Click on +Add notification.

ree

Provide Name as MyNotificationS3Delete.

Under Event select Permanently Delete checkbox.

In the Send to drop down select SNS Topic.

In SNS drop down, select the MyTopic created in above steps.

Click on Save.

ree

An email would be received about this notification.


Step 6: Go to the bucket and select any one image object. Select Actions -> Delete.

ree

SNS service will provide you with notification about deletion on an S3 object through Mail.


Note: Delete the bucket and SNS Topic if you no longer need it.


Was this document helpful? How can we make this document better. Please provide your insights. You can download PDF version for reference.




30 Comments


Shital Gaonkar
Shital Gaonkar
Apr 20, 2024

Very helpful !

Like

Shreya Patne
Shreya Patne
Feb 19, 2024

Easy to understand.

Like

Shruti Bhosekar
Shruti Bhosekar
Feb 19, 2024

Very nice blog sir!

Like

Tanaya Yalrute
Tanaya Yalrute
Feb 19, 2024

Easy to understand sir

Like

Rucha Kulkarni
Rucha Kulkarni
Feb 17, 2024

Very Helpful

Like
bottom of page