AWS SNS - Create SNS Application Platform, SNS Topic, And Add SNS Permission

In this article, we will learn the following things.

AWS SNS Notification

  1. What is AWS?
  2. Create SNS application Platform
  3. Create SNS Topic
  4. Add the SNS Permission

What is AWS?

Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 200 fully-featured services from data centers globally. Millions of customers—including the fastest-growing start-ups, largest enterprises, and leading government agencies—are using AWS to lower costs, become more agile, and innovate faster.

Click here and go to the AWS account portal then click on the upper right corner button that is Sign In to the console.

After logging in into the AWS account, click on Simple Notification Service

AWS SNS

Select Push-Notification

AWS SNS

Create the platform for iOS and Android.

AWS SNS

Create Android Platform

Now, first, we create an android platform.

  • Enter the platform application name
  • Select the FCM in Push-Notification-platform Section
  • Enter the FCM project API key, which is provided by the FCM console.

For tracking the delivery status we need to add the IAM role if it is not there then directly create from create new role button.

AWS SNS

 AWS SNS

When clicking on create a new role, a new dialog appears to give the Allow permission.

AWS SNS

Then click on Create platform application. Here is the android platform created.

Create iOS Platform

Now we will create the iOS platform, so first

  • Enter the platform application name
  • Select the apple iOS/VoIP/MacOS in Push-Notification-platform Section.
  • Uncheck if you used it for development in the sandbox.
  • Select the certificate radio button.
  • Choose file and select the APNS certificate and click OK.
  • Enter the certificate password and click load credentials from file.

AWS SNS

AWS SNS

Here we again create a role for tracking the push notification status. And then click on Create platform application

AWS SNS

Go back and here you can see both platforms ios-prod-platform-1 and android-prod-platform-1.

AWS SNS

Create SNS Topic

Now we are creating the topic so we came back to the SNS dashboard then click on Create Topic.

AWS SNS

After clicking create topic, the new page appears where we select the standard topic type and enter the topic name and Display name then click on create topic.

AWS SNS

So we create one or more topics required for our app.

Permission / Access

Here we set the SNS permission for the Push-Notification-API.

First search the IAM user in the search box then click on it.

AWS SNS

After that, I have to click on the user and click on a user.

AWS SNS

Then click on Add permission then navigate to the permission list

AWS SNS

Here we search and select the default permission and also customize permission which we can create in Policies Section.

AWS SNS

That's it, now you can use the platform ARN and create the end-point and publish the notifications.