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.

InputNotesExample
Access Key ID
string
/ Required
accessKeyId
An AWS IAM Access Key ID
AKIAIOSFODNN7EXAMPLE
Secret Access Key
password
/ Required
secretAccessKey
An AWS IAM Secret Access Key
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

AWS Role ARN

To enable the IAM role authentication begin by logging into the AWS Console and navigate to Identity and Access Management (IAM).

To create an ARN user and generate credentials:

  1. Navigate to Users and select Create User.
  • Provide a User name and check the box providing them user access to the AWS Management Console if needed.
  • Once completed with the User creation, copy the ARN provided in the summary for a later step.
  1. To obtain the ARN for an existing User, click on the designated username from the Users page and the ARN will be provided in the summary section.
  2. From the summary section, select Create access key
  • Select Third-party service as the access key type and select next.
  • Set a description and select create access key.
  • Copy the Access Key and Secret access key and enter those into the connection configuration of your integration along with the ARN.

To create and assign a user a role:

  1. Navigate to Roles and select Create Role.
  • Select Custom Trust Policy for the Trusted entity types
  • Copy the following statement into the statement console. Making sure to replace the ARN with the user's actual ARN from the previous section
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "ARN"
},
"Action": "sts:AssumeRole"
}
]
}
  • When adding permissions provide the AmazonSQSFullAccess permission
  • Complete remaining steps and select Create Role
InputNotesExample
Access Key ID
string
/ Required
accessKeyId
An AWS IAM Access Key ID
AKIAIOSFODNN7EXAMPLE
Role ARN
string
/ Required
roleARN
An AWS IAM Role ARN
arn:aws:iam::OtherAccount-ID:role/assumed-role-name
Secret Access Key
password
/ Required
secretAccessKey
An AWS IAM Secret Access Key
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Data Sources

Select Queues

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

InputNotesExample
Connection
connection
awsConnection
 
 
AWS Region
string
awsRegion
AWS provides services in multiple regions, like us-west-2 or eu-west-1.
us-east-1
Dynamic Access Key ID
string
dynamicAccessKeyId
Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID.
 
Dynamic Secret Access Key
password
dynamicSecretAccessKey
Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key.
 
Dynamic Session Token
password
dynamicSessionToken
Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token.
 

Actions

Create Queue

Create an Amazon SQS Queue | key: createQueue

InputDefaultNotesExample
Connection
connection
awsConnection
 
 
 
AWS Region
string
awsRegion
AWS provides services in multiple regions, like us-west-2 or eu-west-1.
us-east-1
Content Based Deduplication
boolean
contentBasedDeduplication
false
This flag enables Content Based Deduplication on a FIFO queue. Once you create a FIFO queue you cannot change the value of this input.
 
Dynamic Access Key ID
string
dynamicAccessKeyId
Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID.
 
Dynamic Secret Access Key
password
dynamicSecretAccessKey
Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key.
 
Dynamic Session Token
password
dynamicSessionToken
Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token.
 
FIFO Queue
boolean
/ Required
isFifo
false
This flag enables the creation of a FIFO Queue. Once you create a FIFO queue you cannot change it to a standard queue.
 
Name
string
/ Required
name
The name of a new queue. Can only include alphanumeric characters, hyphens, or underscores and must be 1 to 80 characters in length. FIFO queues must end with the .fifo suffix.
my-example-queue
Tags
string
Key Value List
tags
The list of tags you want to tag your AWS SQS queue with.
 

{
"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

InputNotesExample
Connection
connection
awsConnection
 
 
AWS Region
string
awsRegion
AWS provides services in multiple regions, like us-west-2 or eu-west-1.
us-east-1
Dynamic Access Key ID
string
dynamicAccessKeyId
Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID.
 
Dynamic Secret Access Key
password
dynamicSecretAccessKey
Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key.
 
Dynamic Session Token
password
dynamicSessionToken
Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token.
 
Receipt Handle
string
/ Required
receiptHandle
Every time you receive a message from a queue, you receive a receipt handle for that message. This handle is associated with the action of receiving the message, not with the message itself.
AQEBwLpNvpxWR+nqO4frM8rWABCI4dbqTwo7
Queue URL
string
/ Required
url
You require the queue URL to send, receive, and delete queue messages. A queue URL is constructed in the following format: https://{REGION_ENDPOINT}/queue.|api-domain|/{YOUR_ACCOUNT_NUMBER}/{YOUR_QUEUE_NAME}
https://sqs.us-east-1.amazonaws.com/012345678900/my-example-queue

Delete Queue

Delete an Amazon SQS Queue | key: deleteQueue

InputNotesExample
Connection
connection
awsConnection
 
 
AWS Region
string
awsRegion
AWS provides services in multiple regions, like us-west-2 or eu-west-1.
us-east-1
Dynamic Access Key ID
string
dynamicAccessKeyId
Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID.
 
Dynamic Secret Access Key
password
dynamicSecretAccessKey
Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key.
 
Dynamic Session Token
password
dynamicSessionToken
Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token.
 
Queue URL
string
/ Required
url
You require the queue URL to send, receive, and delete queue messages. A queue URL is constructed in the following format: https://{REGION_ENDPOINT}/queue.|api-domain|/{YOUR_ACCOUNT_NUMBER}/{YOUR_QUEUE_NAME}
https://sqs.us-east-1.amazonaws.com/012345678900/my-example-queue

{
"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

InputNotesExample
Connection
connection
awsConnection
 
 
AWS Region
string
awsRegion
AWS provides services in multiple regions, like us-west-2 or eu-west-1.
us-east-1
Dynamic Access Key ID
string
dynamicAccessKeyId
Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID.
 
Dynamic Secret Access Key
password
dynamicSecretAccessKey
Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key.
 
Dynamic Session Token
password
dynamicSessionToken
Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token.
 
Name
string
/ Required
name
The name of a new queue. Can only include alphanumeric characters, hyphens, or underscores and must be 1 to 80 characters in length. FIFO queues must end with the .fifo suffix.
my-example-queue

{
"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

InputNotesExample
Connection
connection
awsConnection
 
 
AWS Region
string
awsRegion
AWS provides services in multiple regions, like us-west-2 or eu-west-1.
us-east-1
Dynamic Access Key ID
string
dynamicAccessKeyId
Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID.
 
Dynamic Secret Access Key
password
dynamicSecretAccessKey
Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key.
 
Dynamic Session Token
password
dynamicSessionToken
Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token.
 
Queue Prefix
string
prefix
Provide an integer value for the maximum amount of items that will be returned. Provide a value from 1 to 50.
20

{
"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

InputNotesExample
Connection
connection
awsConnection
 
 
AWS Region
string
awsRegion
AWS provides services in multiple regions, like us-west-2 or eu-west-1.
us-east-1
Dynamic Access Key ID
string
dynamicAccessKeyId
Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID.
 
Dynamic Secret Access Key
password
dynamicSecretAccessKey
Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key.
 
Dynamic Session Token
password
dynamicSessionToken
Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token.
 
Max Messages
string
maxNumber
Provide a number for the max amount of values to be returned.
5
Queue URL
string
/ Required
url
You require the queue URL to send, receive, and delete queue messages. A queue URL is constructed in the following format: https://{REGION_ENDPOINT}/queue.|api-domain|/{YOUR_ACCOUNT_NUMBER}/{YOUR_QUEUE_NAME}
https://sqs.us-east-1.amazonaws.com/012345678900/my-example-queue
Wait Time (seconds)
string
waitTime
The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.
10
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

{
"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

InputNotesExample
Attributes
string
Key Value List
attributes
Amazon SQS lets you include structured metadata (such as timestamps, geospatial data, signatures, and identifiers) with messages using message attributes. Each message can have up to 10 attributes.
 
Connection
connection
awsConnection
 
 
AWS Region
string
awsRegion
AWS provides services in multiple regions, like us-west-2 or eu-west-1.
us-east-1
Delay Seconds
data
delaySeconds
Provide a number of optional seconds to delay sending a message.
0
Dynamic Access Key ID
string
dynamicAccessKeyId
Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID.
 
Dynamic Secret Access Key
password
dynamicSecretAccessKey
Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key.
 
Dynamic Session Token
password
dynamicSessionToken
Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token.
 
Message
string
/ Required
message
Provide a string containing the message you would like to send.
Example Message
Message deduplication ID
string
messageDeduplicationId
The message deduplication ID is the token used for deduplication of sent messages. If a message with a particular message deduplication ID is sent successfully, any messages sent with the same message deduplication ID are accepted successfully but aren't delivered during the 5-minute deduplication interval.
myExampleDeduplicationId
Message Group Id
string
messageGroupId
The message group ID is the tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are always processed one by one, in a strict order relative to the message group (however, messages that belong to different message groups might be processed out of order).
myExampleMessageGroup
Queue URL
string
/ Required
url
You require the queue URL to send, receive, and delete queue messages. A queue URL is constructed in the following format: https://{REGION_ENDPOINT}/queue.|api-domain|/{YOUR_ACCOUNT_NUMBER}/{YOUR_QUEUE_NAME}
https://sqs.us-east-1.amazonaws.com/012345678900/my-example-queue

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