Orchestration SDKs

Step 2. Configuring AWS for Push notifications on Android

PingOne Advanced Identity Cloud PingAM Android

In this step, you use the service account and key created in the previous steps to set up Amazon Simple Notification Service (SNS) to be able to route push notification messages to Android devices.

You also create a service account and associated access token to provide access to the service to your server.

Setting up AWS for Android push notifications

  1. Log in to the AWS console: https://console.aws.amazon.com/console/home

  2. In the search bar, enter SNS, and then select Simple Notification Service from the list of results.

    Click the star icon () to pin the service to the toolbar in the AWS console.
  3. In the left menu, navigate to Mobile  Push notifications.

  4. In the Platform applications panel, click Create platform application.

  5. On the Create platform application page:

    1. In Application name, enter a name for the platform application.

      For example, Android_Push_Messaging.

    2. In Push notification platform, select Firebase Cloud Messaging (FCM).

      The page displays the Firebase credentials section.

    3. In Firebase credentials, click Choose file, and navigate to the JSON file that you downloaded from Firebase when you created a Firebase key previously.

    4. Click Create platform application.

      The page creates the application and displays the details pane:

      amazon sns arn android en
      Figure 1. An Android platform application in AWS, showing the ARN.
  6. Make a note of the ARN value. You need this value in Step 3. Configuring servers for push notifications.

Creating a service account with access to the ARN endpoints

  1. Log in to the AWS console: https://console.aws.amazon.com/console/home

  2. In the search bar, enter IAM, and then select IAM from the list of results.

    Click the star icon () to pin the service to the toolbar in the AWS console.
  3. In the left menu, navigate to Access management  Users.

  4. Click Create user.

  5. In User name, enter a name for the user account that the access key will represent.

    For example, sns_arn_user.

  6. Click Next.

  7. In Permissions options, select Attach policies directly.

    The page displays additional fields.

  8. In Permissions policies, in the search bar, enter SNSFull, and then select the checkbox next to AmazonSNSFullAccess.

    amazon sns arn user permissions en
    Figure 2. Adding the SNS permission policy to a user in AWS IAM.
  9. Click Next, review the details of the account, and then click Create user.

Creating an access token for the AWS service account

  1. Log in to the AWS console: https://console.aws.amazon.com/console/home

  2. In the search bar, enter IAM, and then select IAM from the list of results.

    Click the star icon () to pin the service to the toolbar in the AWS console.
  3. In the left menu, navigate to Access management  Users, and then click the service account you created previously.

  4. In the Summary pane, click Create access key.

  5. On the Access key best practices & alternatives page:

    1. In Use case, select Third-party service

    2. Under Confirmation, select the I understand the above recommendation and want to proceed to create an access key checkbox.

    3. Click Next.

  6. In Description tag value, enter the purpose of the access key.

    For example, server access to SNS ARN endpoints

  7. Click Create access key.

  8. Make a note of the provided values:

    1. Access Key ID.

      For example, AKIAXOSPRCH15LEES

    2. Secret access key.

      For example, 9eF7EcWMZzChI51BBHkLeElXk8R3XHv7/n7QSiwoUFJ

    Click Download .csv file to download a file containing the values for safe-keeping.
  9. Click Done.