Skip to main content

Amazon SQS Component

Send, receive and manage messages within an Amazon (AWS) SQS queue

Component key: aws-sqs

Description

Amazon SQS is a message queueing service from Amazon Web Services. The Amazon SQS component allows you to send and receive messages within an Amazon SQS queue.

Using Amazon SQS as a FIFO queue for instance executions

If you have a workflow that requires requests to be processed in a specific order, or a workflow that requires you to process only one record at a time, you can leverage the Amazon SQS component along with an SQS FIFO queue to ensure that the requests are processed sequentially.

See Using a FIFO Queue to Ensure In-Order Processing for more information.

Connections

AWS SQS Access Key and Secret

An AWS IAM access key pair is required to interact with Amazon SQS. Make sure that the key pair you generate in AWS has proper permissions to the SQS resources you want to access. Read more about SQS IAM policies in the AWS docs.

Data Sources

Select Queues

Select an SQS queue from a list | key: selectQueue | type: picklist


Actions

Create Queue

Create an Amazon SQS Queue | key: createQueue

Output Example Payload

{
"data": {
"$metadata": {
"httpStatusCode": 200,
"requestId": "00000000-0000-0000-0000-000000000000",
"attempts": 1,
"totalRetryDelay": 0
},
"QueueUrl": "https://sqs.us-east-1.amazonaws.com/012345678900/my-example-queue"
}
}

Delete Message

Delete a message from an Amazon SQS Queue | key: deleteMessage


Delete Queue

Delete an Amazon SQS Queue | key: deleteQueue

Output Example Payload

{
"data": {
"$metadata": {
"httpStatusCode": 200,
"requestId": "00000000-0000-0000-0000-000000000000",
"attempts": 1,
"totalRetryDelay": 0
}
}
}

Get a Queue's URL

Get the URL of an Amazon SQS Queue given its name | key: getQueueUrl

Output Example Payload

{
"data": {
"$metadata": {
"httpStatusCode": 200,
"requestId": "00000000-0000-0000-0000-000000000000",
"attempts": 1,
"totalRetryDelay": 0
},
"QueueUrl": "https://sqs.us-east-1.amazonaws.com/012345678900/my-example-queue"
}
}

List Queues

Fetch a list of Amazon SQS Queues | key: listQueues

Output Example Payload

{
"data": {
"$metadata": {
"httpStatusCode": 200,
"requestId": "00000000-0000-0000-0000-000000000000",
"attempts": 1,
"totalRetryDelay": 0
},
"QueueUrls": [
"https://sqs.us-east-1.amazonaws.com/012345678900/my-example-queue",
"https://sqs.us-east-1.amazonaws.com/012345678900/my-second-queue"
]
}
}

Receive Messages

Receive messages from an Amazon SQS Queue | key: receiveMessages

note

Receive Messages can behave differently depending on what kind of queue you are trying to poll. If you are using a non-FIFO queue, this action may return false blank responses. SNS FIFO is intended for customer use cases where it is critical to maintain the consistency in processing messages across multiple independent services in a strictly ordered manner. If you are polling a FIFO queue you are guaranteed to receive the maximum amount of messages you specify (up to 10) per request. Refer to the AWS docs for information on migrating to a FIFO queue

Output Example Payload

{
"data": {
"$metadata": {
"httpStatusCode": 200,
"requestId": "00000000-0000-0000-0000-000000000000",
"attempts": 1,
"totalRetryDelay": 0
},
"Messages": [
{
"MessageId": "00000000-00000000-00000000-00000000",
"ReceiptHandle": "Example Receipt Handle",
"MD5OfBody": "e909509655c5154f008e0ee43ed655b2",
"Body": "My Test Message",
"Attributes": {
"SenderId": "EXAMPLE5OBBA2B7URDN4G",
"ApproximateFirstReceiveTimestamp": "1646857534190",
"ApproximateReceiveCount": "3",
"SentTimestamp": "1646857528982"
},
"MessageAttributes": {
"exampleKey1": {
"StringValue": "exampleValue",
"DataType": "String"
},
"exampleKey2": {
"StringValue": "exampleValue2",
"DataType": "String"
}
}
}
]
}
}

Send Message

Send a message to an Amazon SQS Queue | key: sendMessage

Output Example Payload

{
"data": {
"$metadata": {
"httpStatusCode": 200,
"requestId": "00000000-0000-0000-0000-000000000000",
"attempts": 1,
"totalRetryDelay": 0
},
"MD5OfMessageBody": "05e891701cde4c383b66f46a7b9a808c",
"MD5OfMessageAttributes": "23adb2d3b76c04a687f9a5fcfb6086bb",
"MessageId": "00000000-00000000-00000000-00000000"
}
}