# AWS SNS - SMS Messaging

## What Is It?

The AWS SNS (Amazon Web Services Simple Notification Service) plugin sends a text message (assuming the user has supplied their phone number) notifying them of deposits and withdrawals.

<figure><img src="https://3965312054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP899VqAdyGFgLTy9SY%2Fuploads%2FyKgwrVSXPhTc18guOdFB%2Fimage.png?alt=media&#x26;token=ba27718f-28b1-4507-a402-44e3a1eb63c4" alt=""><figcaption></figcaption></figure>

## Who Needs It?

Operators who want to give another method of communicating with their exchange's users, making users feel at ease that the system will alert them directly to their mobile in the case of any behavior.

## How to Use It?

{% hint style="info" %}
Please refer to the[ ](https://docs.hollaex.com/plugins/use-plugins/kyc#aws-s3-bucket-setup)[AWS IAM key creation](#aws-resources) section first, before proceeding.
{% endhint %}

After installing AWS SNS on the exchange, we will be given several fields to fill in. Filling these out requires [AWS IAM credentials](#access-key-generation) with AWS SNS access. You'll need to create an IAM policy for the IAM user that you intend to use. This policy will ensure that the user has the appropriate permissions to access and use the SMS service.

The region should follow the[ region code](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions) of AWS.

<figure><img src="https://3965312054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP899VqAdyGFgLTy9SY%2Fuploads%2FSlmDvq88lAZRA8R1UFgZ%2Fimage.png?alt=media&#x26;token=4c2d7a4b-7683-4e12-bf14-5428ecfb11cf" alt=""><figcaption></figcaption></figure>

With this done, the option of whether texts should be sent for both withdrawals and deposits is made. Save that and be ready to go- just ensure to monitor the AWS IAM settings from time to time, to ensure that you have credits for sending messages.

***

For a user, this will look like the following for withdrawals and deposits:&#x20;

<figure><img src="https://3965312054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP899VqAdyGFgLTy9SY%2Fuploads%2FM1vGTCqUMq8ktQtHe9fb%2Fimage.png?alt=media&#x26;token=c199b17e-8b6b-4a62-a867-961153cabeef" alt=""><figcaption></figcaption></figure>

## AWS Resources <a href="#aws-resources" id="aws-resources"></a>

This is required to create a new IAM user to connect to the HollaEx AWS SNS plugin. The plugin will interact with AWS SNS to send text messages.

Please follow the guide below to create the resources.

### Automated resource creation <a href="#automated-resource-creation" id="automated-resource-creation"></a>

{% hint style="info" %}
You can apply a Cloudformation template to automate the IAM creation with a simple click and a few types. Please click the link below to proceed. The AWS Web console will pop up through the link. Please make sure to log in with your existing AWS account.&#x20;

[🔗 Cloudformation Template](https://console.aws.amazon.com/cloudformation/home?region=eu-west-3#/stacks/quickcreate?templateURL=https://hollaex-plugins-cloudformaiton.s3.ap-southeast-1.amazonaws.com/cloudformation-sns.yaml\&stackName=hollaex-sms-sns)
{% endhint %}

<figure><img src="https://3965312054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP899VqAdyGFgLTy9SY%2Fuploads%2FI0sL0ZjQuATCXuVPatxc%2Fimage.png?alt=media&#x26;token=ab83befd-f8a6-43c4-88be-51cee5297e8f" alt=""><figcaption></figcaption></figure>

Once you click the link, you'll see a page to set multiple parameters. Here are a few important ones:

* **Stack name**: The name of the Cloudformation stack. It is okay to leave it as default in most cases.
* **MyIAMUsername:** The name of the new AWS IAM username that you are going to create. This will be used as a name for the IAM user with AWS S3 access. For example: `sms-iam-user`

It is not needed to set the "Permissions - optional" panel in most cases. You can simply skip.

<figure><img src="https://3965312054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP899VqAdyGFgLTy9SY%2Fuploads%2FhFwPGlwEuCYHa6zXmqn7%2Fimage.png?alt=media&#x26;token=22b4bebe-77e2-4afb-89e6-bbeddd51ec1a" alt=""><figcaption></figcaption></figure>

It will take a few minutes for the system to create the resources.

<figure><img src="https://3965312054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP899VqAdyGFgLTy9SY%2Fuploads%2F8w3tSH9vY5O6C5WkXxrx%2FScreenshot%202024-10-19%20at%203.59.25%E2%80%AFPM.png?alt=media&#x26;token=30f5d5f6-b7f3-4b5f-9744-f63c9240c4a7" alt=""><figcaption></figcaption></figure>

Once it's all completed, you'll be able to check the output. You'll get everything necessary, including the IAM Access Key and the Secret Key. Please save this information somewhere safe, and refer to the [docs](#how-to-use-it) to configure the plugin. You are all good now!

### Manual resource creation

You will need to make an IAM policy for an IAM user you are going to use for the SNS. You should create a new policy on the *AWS IAM Console - Access Management - Policies* page.

```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "sns:Publish",
            "Resource": "*"
        }
    ]
}
```

Now, go to the *AWS IAM Console - Access management - Users page* to create a new user for KYC connection. The above policy can then be bound to the account.

Get the access key ID and secret access key once the account is created. Once this account is created, in the user field, you will be provided the Access Key ID and Secret Access Key required.

![](https://3965312054-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MP899VqAdyGFgLTy9SY%2F-MToQ9jSfic65cTFBbCY%2F-MToRvZKeLLB57yMMrnu%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202021-02-18%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%206.22.33.png?alt=media\&token=ae846a9e-d41d-4638-8621-d55f5597b664)
