# SQS Source

## Overview

The steps below enable you to set up an Amazon Simple Queue Service (SQS) source and give you permissions to send data to that queue. Panther pulls events from that queue and allows you to write rules and run queries on the processed data.

{% hint style="info" %}
SQS has a max message size of 256KB. If you expect to send messages bigger than this, consider using an [S3 source](https://docs.panther.com/~/changes/15ann7vKLltCCAGHtdQr/data-onboarding/data-transports/aws/s3) instead.
{% endhint %}

See the diagram below to understand how data flows from your application(s) into Panther using SQS.

<figure><img src="https://4011785613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2FGroDgq19OM9mXYcmQa7h%2FData_Transport_SQS.png?alt=media&#x26;token=4ff3abb4-2424-4412-b1bd-1562419babf6" alt="A diagram shows how data flows from a customer application into Panther, using the SQS Data Transport. The flow is as follows: customer AWS application(s) like Lambda, S3, SNS, etc., SQS (which also takes in Allowed AWS ARNs), Panther application, parse &#x26; normalize, real-time detections, Long term retention in Snowflake, Alerts generated, and Alert destination"><figcaption></figcaption></figure>

## How to onboard SQS logs into Panther

1. In the left-hand navigation bar of your Panther Console, click **Configure** > **Log Sources**.
2. In the upper right corner, click **Create New**.
3. Click the **Custom Log Formats** tile.
4. In the **AWS SQS Queue** tile on the slide-out panel, click **Start**.
5. On the **Configure** page, fill in the fields as follows:

   * **Name**: Enter a descriptive name for your source.
   * **Log Types**: From the drop-down, select all log types that you wish to monitor.
   * **Allowed AWS Principals**: List all ARNs of the AWS principals that will be allowed to publish messages to your SQS queue.
   * **Allowed Source ARNs:** List all ARNs of the AWS resources (SNS topics, S3 buckets, etc.) that can publish messages to your SQS queue.
     * **Note**: If none of **Allowed AWS Principal ARNs** and **Allowed Source ARNs** properties are set, only Principals of the AWS account where Panther is deployed will be able to publish messages to the queue.
   * **Logs Stream Type**: Select one of the following [stream types](https://docs.panther.com/~/changes/15ann7vKLltCCAGHtdQr/custom-log-types/reference#stream-type):
     * JSON
     * JSON Array
     * Lines

   \
   ![The configure page of the new SQS setup flow is shown. There are fields for Name, Log Types, Allowed AWS Principals, Allowed Source ARNs, and Logs Stream Type](https://4011785613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2FFrw5oV7E3QWkI9hmw9yX%2FScreenshot%202023-07-19%20at%2010.02.21.png?alt=media\&token=82932d93-6031-4abf-afdd-8bff4fe33e47)
6. Click **Setup**. You will be directed to a success screen:<br>

   <figure><img src="https://4011785613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2FMTRmOqjJY878NPgsMe1B%2FScreenshot%202023-08-03%20at%204.33.30%20PM.png?alt=media&#x26;token=7cf48278-6e1f-455a-81aa-2d76388fbfa8" alt="The success screen reads, &#x22;Everything looks good! Panther will now automatically pull &#x26; process logs from your account&#x22;" width="281"><figcaption></figcaption></figure>

   * You can optionally enable one or more [Detection Packs](https://docs.panther.com/detections/panther-managed/packs).
   * The **Trigger an alert when no events are processed** setting defaults to **YES**. We recommend leaving this enabled, as you will be alerted if data stops flowing from the log source after a certain period of time. The timeframe is configurable, with a default of 24 hours.<br>

     <figure><img src="https://4011785613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2FyXM7rz58X1m3iNo3w69h%2FScreenshot%202023-08-03%20at%204.26.54%20PM.png?alt=media&#x26;token=586be93d-b2a0-4c03-aa07-098fbc524000" alt="The &#x22;Trigger an alert when no events are processed&#x22; toggle is set to YES. The &#x22;How long should Panther wait before it sends you an alert that no events have been processed&#x22; setting is set to 1 Day" width="320"><figcaption></figcaption></figure>

To view your newly created source, click **View Log Source**.

* Manage your AWS SQS source here for data and events processed, overall health, source schemas, alarm configuration, etc.

<figure><img src="https://4011785613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2FF7oqNNHRMVunebSEoPim%2Flog-source-data.png?alt=media&#x26;token=3d862993-1bf2-4dc6-8dc4-0889e59f2c90" alt="This page displays Data Metrics such as data processed, events processed, and data processed by log type. To view this data, click on a log source."><figcaption></figcaption></figure>

## View Collected Logs

After SQS log sources are configured, you can search your data in Data Explorer. For more information and for example queries, please see the [Data Explorer documentation](https://docs.runpanther.io/data-analytics/data-explorer).
