# Send data to Amazon SQS

{% hint style="info" %}
See the changelog of the **Amazon SQS** Data sink type [here](/data-sinks/amazon-sqs-data-sink.md).
{% endhint %}

## Overview

The following article outlines a basic data flow from Onum to **Amazon SQS.**

Amazon SQS (Simple Queue Service) is a fully managed message queuing service that enables asynchronous communication between different parts of a distributed system. It allows developers to send, store, and retrieve messages without needing to manage the underlying queue infrastructure.

## Prerequisites

You will need an **IAM** User, role or group with the correct permissions to access and manage SQS.&#x20;

## Amazon SQS Setup&#x20;

**Go to IAM (Identity and Access Management)** to manage users, groups, roles and permissions.&#x20;

Under **Permissions Policies**, make sure you have assigned the policy `AmazonSQSFullAccess` to give full access to SQS resources. Alternatively, if you have custom permissions, go to **Policies - Create Policy** and in the **JSON** tab, paste your custom JSON e.g.

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sqs:CreateQueue",
        "sqs:GetQueueAttributes",
        "sqs:SendMessage"
      ],
      "Resource": "*"
    }
  ]
}
```

Download the **Access Key ID** and **Secret Access Key** — you’ll need these later.

## Onum setup

{% stepper %}
{% step %}
Log in to your Onum tenant and click **Data Sinks> New Data sink**.
{% endstep %}

{% step %}
Double-click the **Amazon SQS** Sink.
{% endstep %}

{% step %}
Enter a **Name** for the new Data Sink. Optionally, add a **Description** and some **Tags** to identify the Sink.
{% endstep %}

{% step %}
Decide whether or not to include this Data sink info in the metrics and graphs of the [**Home**](/the-workspace/home.md) area.
{% endstep %}

{% step %}
Choose the **Key format** for the name of the objects:

* The prefix used to organize your S3 data.
* **Partition by** indicates the frequency with which to generate a new S3 object e.g. every year, month, day hour, minute. If left blank, the value used will be the **Max object size / Input size** entered in the Data sink configuration.
  {% endstep %}

{% step %}
In the **AWS authentication** section, enter the **Region**<mark style="color:red;">**\***</mark> of your AWS console, found in your **General purpose buckets** area, next to the name.

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

{% endstep %}

{% step %}
Select the **Access Key ID** from your [Secrets](/administration/tenant-menu.md) or click **New secret** to generate a new one.&#x20;

The **Access Key ID** is found in the **IAM Dashboard** of the **AWS Management Console**.

1. In the left panel, click on **Users**.
2. Select your **IAM user**.
3. Under the **Security Credentials** tab, scroll to **Access Keys**, and you will find existing **Access Key IDs** (but not the secret access key).
   {% endstep %}

{% step %}
Select the **Secret Access Key** from your [Secrets](/administration/tenant-menu.md) or click **New secret** to generate a new one.

Under **Access keys**, you can see your **Access Key IDs**, but AWS **will not show the Secret Access Key**. You must have it saved somewhere. If you don't have the secret key saved, you need to create a new one.
{% endstep %}

{% step %}
Click **New secret** to create a new one:

* Give the secret a **Name**.
* Turn off the **Expiration date** option.
* Click **Add new value** and paste the secret corresponding to the JWT token you generated before. Remember that the token will be added in the Zscaler configuration.
* Click **Save**.

<figure><picture><source srcset="/files/NeeWsSQzoChVxRIY76Nt" media="(prefers-color-scheme: dark)"><img src="/files/1oTccyPmgZJ1laY7IhZH" alt=""></picture><figcaption></figcaption></figure>

{% hint style="info" %}
Learn more about secrets in Onum in [this article](/administration/global-settings/organization-settings/secrets-management.md).
{% endhint %}
{% endstep %}

{% step %}
Set the **Bulk configuration** parameter to **true** if you want to allow bulk sending. Configure the following parameters:

* **Event time limit**<mark style="color:red;">**\***</mark> - Time in seconds to wait before sending the batch. The default value is `1`, and the minimum is `0`.
* **Trigger conditions**
  * **Number of events**<mark style="color:red;">**\***</mark> - Maximum number of events to send in a single batch. The maximum and default value is `10`.
  * **Event size**<mark style="color:red;">**\***</mark> - Maximum limit of the batch size in bytes. The maximum and default value is `262144`. The minimum value is `1`.
    {% endstep %}

{% step %}
In the **Other** section

* If you have non-default URL that directs API requests to a specific Kinesis service endpoint, enter it here in the **Custom endpoint**.
* Specify **Delay seconds** length of time, in seconds, for which to delay a specific message. The minimum value is `1` and the maximum value is `900`.
  {% endstep %}
  {% endstepper %}

Click **Create data sink** when complete.&#x20;

Your new Data sink will appear in the **Data sinks** area list.

## Pipeline configuration

When it comes to using this Data sink in a [Pipeline](/the-workspace/pipelines.md), you must configure the following output parameters. To do it, simply click the Data sink on the canvas and select **Configuration**.

### Output configuration

<table><thead><tr><th width="147.62890625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Message</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Select the field that contains the message. The data type must be <code>string</code>.</td></tr></tbody></table>

#### Queue configuration

<table><thead><tr><th width="147.62890625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Standard</strong></td><td><p><strong>Queue name</strong><mark style="color:red;"><strong>*</strong></mark>: The URL of your existing Amazon SQS queue to send the data to. To get it:</p><p></p><ol><li><strong>Go to the</strong> AWS Management Console.</li><li>In the <strong>Search Bar</strong>, type <code>SQS</code> and click on <strong>Simple Queue Service (SQS)</strong>.</li><li>Click on <strong>Queues</strong> in the left panel.</li><li>Locate your queue from the list and click it. </li><li>The <strong>Queue URL</strong> will be displayed in the table under <strong>URL</strong>.</li></ol><p>This is the correct format: <code>sqs.region.localhost/awsaccountnumber/storedinenvvar</code></p></td></tr><tr><td><strong>FIFO</strong></td><td><ol><li><p><strong>Queue name</strong><mark style="color:red;"><strong>*</strong></mark>: The URL of your existing Amazon SQS queue to send the data to. To get it:</p><ol><li><strong>Go to the</strong> AWS Management Console.</li><li>In the <strong>Search Bar</strong>, type <code>SQS</code> and click on <strong>Simple Queue Service (SQS)</strong>.</li><li>Click on <strong>Queues</strong> in the left panel.</li><li>Locate your queue from the list and click it. </li><li><p>The <strong>Queue URL</strong> will be displayed in the table under <strong>URL</strong>.</p><p>This is the correct format: <code>sqs.region.localhost/awsaccountnumber/storedinenvvar</code></p></li></ol></li><li><strong>Message group ID</strong><mark style="color:red;"><strong>*</strong></mark>: Select an incoming field to serve as the message group ID.</li><li><p><strong>Send message deduplication:</strong> Toggle <strong>ON</strong> to enable message deduplication and configure the following fields</p><ol><li><strong>InEventField:</strong> choose the incoming field for the message deduplication ID.</li><li><strong>Message content hash</strong>: when content-based deduplication is enabled, the message deduplication ID is optional.</li></ol></li></ol></td></tr></tbody></table>

<figure><picture><source srcset="/files/a59rdjL6mfC9WoQdZh4E" media="(prefers-color-scheme: dark)"><img src="/files/lCB7ZgaMf4KDvRrMx9SD" alt=""></picture><figcaption></figcaption></figure>

Click **Save** to save your configuration.


---

# 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.onum.com/the-workspace/data-sinks/data-sink-integrations/send-data-to-aws-products/send-data-to-amazon-sqs.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.
