# AWS SQS

<div align="left"><img src="https://111806075-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg4otljWU9FsHKYhTsW%2Fuploads%2FGkivw0ZI1xXwGCSTtYD1%2Fimage.png?alt=media&#x26;token=ca7a85c8-4789-40d4-aa5a-3c8a1ab06531" alt=""></div>

Node publish messages to the AWS SQS (Amazon Simple Queue Service).

**Configuration:**

![](https://111806075-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg4otljWU9FsHKYhTsW%2Fuploads%2FEhSMWI6UwYwCt2v9ebTb%2Fimage.png?alt=media\&token=1471b6f7-d079-40dd-90aa-34989b1c7eaf)

* **Queue Type** - SQS queue type. Can be *Standard* or *FIFO*.
* **Queue URL Pattern** - Pattern for building Queue URL. For example `${deviceType}`. Can be set direct Queue URL for message publishing or pattern can be used, that will be resolved to the real Queue URL using Message metadata.
* **Delay** - delay in seconds, used to delay a specific message.
* **Message attributes** - optional list of message attributes to publish.
* **AWS Access Key ID** and **AWS Secret Access Key** are the credentials of an AWS IAM User with programmatic access. More information on AWS access keys can be found [here](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
* **AWS Region** must correspond to the one in which the SQS Queue(s) are created. Current list of AWS Regions can be found [here](http://docs.aws.amazon.com/general/latest/gr/rande.html).

In the following example, Queue URL depends on Device Type and there is a Message that contains **deviceType** field in Metadata:

```
{
    deviceType: controller
}
```

For publishing message in **controller**’s Queue, we will set this pattern in **Queue URL pattern**:

```
https://sqs.us-east-1.amazonaws.com/123456789012/${deviceType}
```

In runtime, pattern will be resolved to `https://sqs.us-east-1.amazonaws.com/123456789012/controller`

**Published body** - Node will publish full Message payload to the SQS. If required, Rule Chain can be configured to use chain of Transformation Nodes for sending correct Payload to the SQS.

**Published attributes** - optional list of attributes can be added for publishing message in SQS. It is a collection of - pairs. Both, NAME and VALUE, could be a static values or patterns that will be resolved using Message metadata.

If **FIFO** queue is selected, then Message ID will be used as **deduplication ID** and Message originator as **group ID**.

**Outbound message** from this node will contain response **messageId**, **requestId**, **messageBodyMd5**, **messageAttributesMd5** and **sequenceNumber** in Message metadata. Original Message payload, type and originator will not be changed.
