DEV Community

IssueResolver-collab
IssueResolver-collab

Posted on

AWS SNS(Simple Notification Service) notifications not getting delivered to device??

Have you ever came across such issue where your AWS SNS messages sent from AWS console not displaying on your mobile device?

If your answer is YES, then you are at right place

In this article we will focus on how to resolve this issue:

Prerequisites :
1)You have done all AWS SNS configuration(created AWS SNS topic,created platform application,created platform application endpoint and added endpoint as subscriber of topic)
2)registered your app and device with FCM and AWS SNS.

Source : Link.

  1. Go to AWS console
  2. Go to the SNS topic that you created earlier
  3. Click on publish message button on top right corner.
  4. Here a page will open up as shown below.Select "Custom payload for each delivery protocol" radio button.

Alt Text

  1. Now you can go to Link and select the platform-specific message format. in my case I used GCM format as shown above

Note that default fallback message is compulsory to give in json body.

  1. in my case I added payload as

{
"GCM":"{ \"notification\": { \"body\": \"Sample message for Android endpoints\", \"title\":\"TitleTest\" } }"
}

  1. Now check your device for notifications

That's it. Thanks for reading this article.

Let me know in comment section.

Top comments (0)