Amazon SNS

Amazon Simple Notification Service (SNS) is a fully managed messaging service that delivers messages from publishers to subscribers, supporting various protocols like HTTP, HTTPS, email, SMS, and more. It uses a publish-subscribe model, enabling applications to send notifications to users, other applications, or even devices.

Subscribers to an SNS topic can receive messages through different endpoints, depending on their use case, such as:

  • Amazon SQS

  • Lambda

  • HTTP(S) endpoints

  • Email

  • Mobile push notifications

  • Mobile text messages (SMS)

  • Amazon Data Firehose

  • Service providers (For example, Datadog, MongoDB, Splunk)

To send emails to multiple users, you need to create multiple subscriptions, each with its own set of end users. This is necessary because there is only one End Point.

Follow the steps below to setup the Amazon SNS Integration to iXHello:

Prerequisites

  1. An iX Hello Account

For steps to create an iX Hello account, use the following steps:

https://docs.ixhello.com/ixhc/general/ixhello-create-accountarrow-up-right

  1. An app in the ix Hello account

One app in ix Hello should be created and at least one Utterance as well.

  1. An active AWS-Account

    You should have an active AWS Account. If you do not have it, you can create an AWS account at https://portal.aws.amazon.com/billing/signup#/startarrow-up-right

    AWS Accounts Include 12 Months of Free Tier Access

    Steps

    To proceed with these steps, you should have all the pre-requisites satisfied. If you are missing something, please go back and make sure you satisfy all of them.

    Once done, you can now proceed with the following process.

  2. Create Amazon SNS Function

  • You will be directed to the Amazon SNS dashboard.

  • Click on Create Topic. Fill in the following details:

    • Type: Choose Standard

    • Name: SNS_Demo

    • Click: Create Topic

  • You will be now directed to the following screen where the topic is created, if you want to add more topics, click on create topic.

  • Click on Create Subscription.

  • Fill in the following details:

    • Topic ARN: arn:aws:sns:us-east-1:2**********************

    • Protocol: Can choose Email or SMS

    • Enter the Endpoint: Your Email ID or the receivers email id

    • Click on Create Subscription

  • To activate your subscription, please click on the provided link and follow the instructions for confirmation. Once you successfully create your subscription, you will receive an email with the subject line "AWS Notification - Subscription Confirmation." This email will serve as a verification that your subscription has been officially established. Ensure you check your email inbox, including the spam or junk folders, to find this confirmation email. If you do not receive the email promptly, you may need to verify your email address or resend the subscription request. This process helps authenticate the subscription and ensures you receive all future

  • To test if an email is received at the provided user details, click on "Publish Message."

  • Please add draft the details as per your convenience and click on publish message.

  • Once clicked on Publish message, the user will receive the email to the provided email id.

  1. Let's integrate Amazon SNS with iX Hello.

    1. Step 1 Connect to Amazon SNS

  • To Configure Amazon SNS, browse to: Integration > Connect System > Add New Connection in the iX Hello platform and select options as shown below.

Once you click on “Next” button, you will be redirected to the configuration screen where you need to provide connection information as shown below.

If you do not have this information ready, please refer to the pre-requisites #3

The table below explains each of the inputs shown on this screen.

Input

Information

Service Instance Name

You can give any value of your choice.

Consumer Key

This is your AWS Access key ID

Consumer Secret

This is your AWS Secret access key

Region

AWS Region Name. Your Lambda functions should be in this region.

Fill the required information and click on “Validate and Save Settings” button, this will validate the details and if it is correct, integration will be saved, and you will be redirected to the integrations listing page as shown below.

  1. Create an App for Amazon SNS

To create a skill, browse to Apps > Custom Apps and click on New Custom App button as shown below.

You should see a small popup as shown below.

Click on save, this will create an app, and you should see a screen as shown below,

Please follow this document to create the weather App

Please incorporate the following steps, which are specific to Amazon SNS, alongside those mentioned in the above link.

Create a Data Source

Now you should see screen as shown below.

To create a data source, click on ‘Create New Data Source’ button and you should see a popup screen as shown below

Give a name of your choice and make sure you select the SNS integration that you have created in Step 1 and click on Save.

Once a data source is created, you are ready to start creating various methods.

Create Methods to fetch the data from Amazon SNS

Methods allows you to execute the SNS function. To access the methods, click on the “Methods” tab which is next to the “Data Sources” tab.

  • Managed Method: Send Email

  • Method Input:

    • Method Name: Send Email

    • Request Type: Send Message

  • Parameters:

    • Topic: arn:aws:snsXXXXXXXXXXXXXXXXXXXXXXXX

    • Message: Please find the weather Details based on your request

Method Output

Result Type : Record

Method Result

Record JsonPath : $.choices[0].message

Valid Result Remplate : {{Records}}

Empty Result Template : Sorry, Email could not be sent. How else can I help you?

Click : Save and Test

Test Results:

The user will recieve an email notification as shown below:

Create Intents:

If the user wants to send an email to the specific end user on the weather report: Current, Forecast, Specific Date etc :

Gen AI Intent:

Name: chatintent

Intent Type: Search

Intent Action: Execute Method

Data Source: Gen AI

Data Source Method: Chat Compeltion RAG

Click on check box: After Method

Data Source: SNS DS

Data Source Method: Send Email

Dialog Delegation Strategy: FallbackToSkill

Click: Save

Current Weather Intent:

Name: GetCurrentWeatherIntent

Intent Type: Search

Intent Action: Execute Method

Data Source: WeatherDataSource

Data Source Method: Get Current Weather Method

Click on check box: After Method

Data Source: SNS DS

Data Source Method: Send Email

Dialog Delegation Strategy: FallBackToSkill

Click: Save

Forecast Intent

Name: GetForecastIntent

Intent Type: Search

Intent Action: Execute Method

Data Source: WeatherDataSource

Data Source Method: Get Forecast Method

Click on check box: After Method

Data Source: SNS DS

Data Source Method: Send Email

Dialog Delegation Strategy: FallBackToSkill

Click: Save

Weather for Specific Date Intent

Name: GetWeatherforSpecificDateIntent

Intent Type: Search

Intent Action: Execute Method

Data Source: WeatherDataSource

Data Source Method: Get Specific Day Weather Intent

Click on check box: After Method

Data Source: SNS DS

Data Source Method: Send Email

Dialog Delegation Strategy: FallBackToSkill

Click: Save

Weather for Specific Day Intent

Name: GetWeatherforSpecificDayIntent

Intent Type: Search

Intent Action: Execute Method

Data Source: WeatherDataSource

Data Source Method: Get Specific Day Weather Intent

Click on check box: After Method

Data Source: SNS DS

Data Source Method: Send Email

Dialog Delegation Strategy: FallBackToSkill

Click: Save

Last updated

Was this helpful?