# Amazon SQS

The Amazon SQS (Simple Queue Service) piece in ZBrain Flow allows you to send messages to AWS SQS queues as part of your automated workflows. It helps you manage reliable, scalable communication between distributed systems without needing to handle complex message broker infrastructure. By adding this connector to your flow, you can queue messages for downstream services or workers to process asynchronously.

This is useful for use cases like task scheduling, batch processing, decoupled microservices, and any workflow that involves passing data between services in a controlled, fault-tolerant way.

### **How to Use Amazon SQS in ZBrain Flow** <a href="#how-to-use-amazon-sqs-in-zbrain-flow" id="how-to-use-amazon-sqs-in-zbrain-flow"></a>

**Select Amazon SQS (Send Message) as Your Action**

1. In your ZBrain Flow, click the **+** button and search for Amazon SQS.
2. Select Amazon SQS (Send Message) from the list.

#### **Set Up the Amazon SQS Connection** <a href="#set-up-the-amazon-sqs-connection" id="set-up-the-amazon-sqs-connection"></a>

Before using the piece, you need to create a secure connection to your AWS account.

To create the connection:

1. In the ‘Connection’ dropdown, click ‘Create Connection’.
2. In the pop-up window, fill in the following details:
   * **Connection Name**: A label for this connection (e.g., Amazon SQS)
   * **Access Key ID**: Your AWS access key
   * **Secret Access Key**: Your AWS secret key
   * **Region**: The AWS region where your SQS queue is located
3. Click ‘Save’ to store the connection.

To find the correct region, refer to this document, “[Amazon Simple Notification Service endpoints and quotas - AWS General Reference](https://docs.aws.amazon.com/general/latest/gr/sns.html)”.

#### **Send a Message to an SQS Queue** <a href="#send-a-message-to-an-sqs-queue" id="send-a-message-to-an-sqs-queue"></a>

Once your connection is configured:

1. In the ‘Queue URL’ field, enter the full URL of your target SQS queue.
2. In the ‘Message Body’ field, enter the message you want to send. This can be plain text or JSON, depending on what your consumer service expects.


---

# 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.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/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.
