# 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:&#x20;

<https://docs.ixhello.com/ixhc/general/ixhello-create-account>

2. **An app in the ix Hello account**

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

3. **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#/start>

   *AWS Accounts Include 12 Months of Free Tier Access*

   ### Steps <a href="#toc94634311" id="toc94634311"></a>

   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.
4. **Create Amazon SNS Function**

* Login to your AWS console in [https://console.aws.amazon.com](https://console.aws.amazon.com/) using your AWS credentials.
* Search for Amazon SNS in the search bar and click on Amazon SNS.

<figure><img src="/files/YXQqNPQXPyKqrWSGLS2V" alt=""><figcaption></figcaption></figure>

* You will be directed to the Amazon SNS dashboard.

<figure><img src="/files/jRZ5FwT5rzGjEoQJjCWC" alt=""><figcaption></figcaption></figure>

* Click on Create Topic. Fill in the following details:
  * Type: Choose Standard
  * Name: SNS\_Demo
  * Click: Create Topic

<figure><img src="/files/xINyI8qfukIEf1fYi6uO" alt=""><figcaption></figcaption></figure>

* 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.&#x20;

<figure><img src="/files/aQkDOiftMFvLKgmT7iRF" alt=""><figcaption></figcaption></figure>

* 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

<figure><img src="/files/DP2LeVZ3aCx1a46UlYlm" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/UoOmkWagA2sJ4ddMRxTU" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/oqCu0iGPAgcVlwLxb9kn" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/CPs4gNOK90vEWqfpZdbn" alt=""><figcaption></figcaption></figure>

5. Let's integrate Amazon SNS with iX Hello.
   1. Step 1 Connect to Amazon SNS
   2. Login to the iX Hello at  [https://bots.ixhello.com](https://bots.ixhello.com/)

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

<figure><img src="/files/2muUOSpmxEtc9b9UpWEf" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/fgClKltdg0lQG568xbHj" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="/files/ci6v1DqcUZ2lT0Vk238U" alt=""><figcaption></figcaption></figure>

6. 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.

<figure><img src="/files/wpQfQQigghGILRPr94Bp" alt=""><figcaption></figcaption></figure>

You should see a small popup as shown below.

<figure><img src="/files/A9JiYTtklKOcJy7PKxtN" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/zY2lIdPBIhXDmq8GK6U2" alt=""><figcaption></figcaption></figure>

Please follow [this](/ixhc/step-by-step-bot-creation-guide/weather-bot.md) 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 <a href="#toc48572870" id="toc48572870"></a>

Now you should see screen as shown below.

<figure><img src="/files/19Mjw5vCaNjMUmS7Nv0R" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/j3irRNcNPu1EO9offDxG" alt=""><figcaption></figcaption></figure>

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 <a href="#toc48572871" id="toc48572871"></a>

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.

<figure><img src="/files/RoLzJ6R4iUHfLEHf40eO" alt=""><figcaption></figcaption></figure>

* Managed Method: Send Email
* Method Input:&#x20;
  * Method Name: Send Email&#x20;
  * Request Type: Send Message
* Parameters:&#x20;
  * Topic: arn:aws:snsXXXXXXXXXXXXXXXXXXXXXXXX
  * Message: Please find the weather Details based on your request&#x20;

<figure><img src="/files/fyPb4Be238dF30cmixSF" alt=""><figcaption></figcaption></figure>

Method Output

Result Type : Record

<figure><img src="/files/cfM3fE7E4LPdM48AG6wV" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/W9XfCL1EaZ8FVUOs38CR" alt=""><figcaption></figcaption></figure>

Test Results:

The user will recieve an email notification as shown below:

<figure><img src="/files/Dug2VFGU3UbFBmRNydQ4" alt=""><figcaption></figcaption></figure>

### Create Intents: <a href="#toc48572871" id="toc48572871"></a>

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

<figure><img src="/files/hLLwXNKPUgYGZApiErQ8" alt="" width="563"><figcaption></figcaption></figure>

**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<br>

<figure><img src="/files/gfe9aJ8gT1ZgSaSePy6G" alt="" width="563"><figcaption></figcaption></figure>

**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

<figure><img src="/files/aLcT3OWvN0NQBH5O6T1k" alt="" width="563"><figcaption></figcaption></figure>

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

<figure><img src="/files/4c1B6AA8XItf1f0ReH9q" alt="" width="563"><figcaption></figcaption></figure>

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

<figure><img src="/files/MzITqsx37AEVnODplL9u" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ixhello.com/ixhc/amazon-sns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
