• /
  • EnglishEspañolFrançais日本語한국어Português
  • Inicia sesiónComenzar ahora

AWS SQS actions

This page provides a reference for AWS SQS actions available in the workflow automation actions catalog. Use these actions to manage Amazon SQS queues and messages.

Prerequisites

Before using AWS actions in workflow automation, ensure you have:

  • An AWS account with appropriate permissions.
  • AWS credentials configured (IAM user credentials, IAM role ARN, or session credentials).
  • The necessary IAM permissions for SQS. At minimum, the IAM role or user needs sqs:* on the target queues.

See Set up AWS credentials for information on how to create IAM users and IAM roles, and set up static and session AWS credentials for integration with workflow automation AWS actions.

Send a message to an SQS queue

The action identifier is aws.sqs.sendMessage.

Sends a message to a specified Amazon SQS queue.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the target SQS queue.

https://sqs.us-east-2.amazonaws.com/123456789012/my-queue

messageBody

String

Required. Message body to send to the queue.

"This is a test message"

messageDeduplicationId

String

Optional. Token used for deduplication in FIFO queues.

"abc123deduplicationId5678"

messageGroupId

String

Optional. Message group ID for FIFO queues.

"group1"

messageAttributes

Map

Optional. Message attributes as key-value pairs.

{"my_attribute_name_1": {"DataType": "String", "StringValue": "my_attribute_value_1"}}

delaySeconds

Int

Optional. Number of seconds to delay message delivery.

123

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"statusCode": 200, "payload": {"MessageId": "e9b73a52-...", "MD5OfMessageBody": "fae535c7f..."}}

success

Boolean

true or false

errorMessage

String

"SQS.Client.exceptions.QueueDoesNotExist: The specified queue does not exist."

Receive a message from an SQS queue

The action identifier is aws.sqs.receiveMessage.

Retrieves one or more messages from the specified queue.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the target SQS queue.

https://sqs.us-east-2.amazonaws.com/123456789012/my-queue

maxNumberOfMessages

Int

Optional. Maximum number of messages to retrieve (1–10).

10

waitTimeSeconds

Int

Optional. Duration in seconds for long-polling.

5

VisibilityTimeout

Int

Optional. Duration in seconds that received messages are hidden from other consumers.

123

AttributeNames

List

Optional. Queue attribute names to include in the response.

["All"]

messageAttributeNames

List

Optional. Message attribute names to retrieve.

["message_attribute_name"]

messageSystemAttributeNames

List

Optional. System message attributes to retrieve.

["SenderId", "SentTimestamp"]

receiveRequestAttemptId

String

Optional. Deduplication token for FIFO queue receive requests.

"req-1234abcd"

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"Messages": [{"MessageId": "...", "Body": "...", "ReceiptHandle": "..."}]}

success

Boolean

true or false

errorMessage

String

"SQS.Client.exceptions.QueueDoesNotExist: The specified queue does not exist."

Create an SQS queue

The action identifier is aws.sqs.createQueue.

Creates a new Amazon SQS queue with specified configuration.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue will be created.

us-east-1

queueName

String

Required. Name for the new queue (1–80 characters). Must be unique within your account and region. For FIFO queues, the name must end with .fifo.

"my-app-queue"

attributes

Map

Optional. Queue attributes as key-value pairs. Common attributes: DelaySeconds, MessageRetentionPeriod, VisibilityTimeout, RedrivePolicy. All values must be strings, including numeric values.

{"DelaySeconds": "0", "MessageRetentionPeriod": "345600"}

tags

Map

Optional. Tags to assign to the queue as key-value pairs. Maximum 50 tags. The aws: prefix is reserved.

{"Environment": "production", "Team": "backend"}

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "queueUrl", "expression": ".response.QueueUrl"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"QueueUrl": "https://sqs.us-east-1.amazonaws.com/123456789012/my-queue"}

success

Boolean

true or false

errorMessage

String

Error message on failure.

Delete an SQS queue

The action identifier is aws.sqs.deleteQueue.

Deletes an Amazon SQS queue. All messages in the queue are permanently deleted and this operation cannot be undone. There is a 60-second delay before you can recreate a queue with the same name.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the queue to delete.

https://sqs.us-east-1.amazonaws.com/123456789012/my-queue

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "status", "expression": ".success"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

Get SQS queue attributes

The action identifier is aws.sqs.getQueueAttributes.

Retrieves attributes for an Amazon SQS queue, including message counts, ARN, visibility timeout, and other configuration. Attribute names are case-sensitive.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the queue.

https://sqs.us-east-1.amazonaws.com/123456789012/my-queue

attributeNames

List

Optional. Attribute names to retrieve. Use ["All"] to return all attributes. Defaults to all.

["ApproximateNumberOfMessages", "QueueArn"]

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "messageCount", "expression": ".response.Attributes.ApproximateNumberOfMessages"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"Attributes": {"QueueArn": "arn:aws:sqs:...", "ApproximateNumberOfMessages": "5", "VisibilityTimeout": "30"}}

success

Boolean

true or false

errorMessage

String

Error message on failure.

Set SQS queue attributes

The action identifier is aws.sqs.setQueueAttributes.

Updates one or more attributes of an Amazon SQS queue. All attribute values must be strings, including numeric values.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the queue to update.

https://sqs.us-east-1.amazonaws.com/123456789012/my-queue

attributes

Map

Required. Queue attributes to set as key-value pairs. Common attributes: DelaySeconds, MessageRetentionPeriod, VisibilityTimeout, RedrivePolicy, KmsMasterKeyId. All values must be strings.

{"VisibilityTimeout": "60", "MessageRetentionPeriod": "345600"}

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "status", "expression": ".success"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

Purge an SQS queue

The action identifier is aws.sqs.purgeQueue.

Deletes all messages in an Amazon SQS queue without deleting the queue itself. This operation is irreversible. The purge can take up to 60 seconds to complete, and messages sent during this window may also be deleted.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the queue to purge.

https://sqs.us-east-1.amazonaws.com/123456789012/my-queue

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "status", "expression": ".success"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

List SQS queues

The action identifier is aws.sqs.listQueues.

Lists SQS queues in your AWS account, optionally filtered by queue name prefix. Queue name matching is case-sensitive. Returns up to 1,000 results per request by default.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region to list queues from.

us-east-2

queueNamePrefix

String

Optional. Filter queues by name prefix.

"prod-"

maxResults

Number

Optional. Maximum number of results to return (1–1000). Defaults to 1000.

100

nextToken

String

Optional. Pagination token from a previous response to retrieve the next page of results.

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "queueUrls", "expression": ".response.QueueUrls // []"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"QueueUrls": ["https://sqs.us-east-1.amazonaws.com/123456789012/queue1", "..."], "NextToken": "..."}

success

Boolean

true or false

errorMessage

String

Error message on failure.

Delete a message from an SQS queue

The action identifier is aws.sqs.deleteMessage.

Deletes a specific message from an Amazon SQS queue using its receipt handle. Obtain the receipt handle from aws.sqs.receiveMessage. Receipt handles expire after the queue's visibility timeout. If the timeout expires, receive the message again to get a new handle.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the queue containing the message.

https://sqs.us-east-1.amazonaws.com/123456789012/my-queue

receiptHandle

String

Required. Receipt handle of the message to delete. Obtained from aws.sqs.receiveMessage.

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "status", "expression": ".success"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

Tag an SQS queue

The action identifier is aws.sqs.tagQueue.

Adds or updates tags on an Amazon SQS queue. This operation adds or updates only the specified tags without removing existing tags. Maximum 50 tags per queue. Tag keys and values are case-sensitive. The aws: prefix is reserved and cannot be used.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the queue to tag.

https://sqs.us-east-1.amazonaws.com/123456789012/my-queue

tags

Map

Required. Tags to add or update as key-value pairs.

{"Environment": "production", "Team": "backend"}

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "status", "expression": ".success"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

Remove tags from an SQS queue

The action identifier is aws.sqs.untagQueue.

Removes specified tags from an Amazon SQS queue. Tag keys are case-sensitive. Specifying keys that don't exist does not cause an error.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the queue to untag.

https://sqs.us-east-1.amazonaws.com/123456789012/my-queue

tagKeys

List

Required. Tag keys to remove from the queue.

["TestRun", "ExpirationDate"]

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "status", "expression": ".success"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

List SQS queue tags

The action identifier is aws.sqs.listQueueTags.

Lists all tags associated with an Amazon SQS queue.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queue is located.

us-east-2

queueUrl

String

Required. URL of the queue.

https://sqs.us-east-1.amazonaws.com/123456789012/my-queue

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "tags", "expression": ".response.Tags"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"Tags": {"Environment": "production", "Team": "backend"}}

success

Boolean

true or false

errorMessage

String

Error message on failure.

Start a message move task

The action identifier is aws.sqs.startMessageMoveTask.

Starts a task to move messages from one queue to another. The primary use case is recovering messages from a dead-letter queue (DLQ) back to the source queue. Only one active message move task is allowed per source queue at a time.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queues are located.

us-east-2

sourceArn

String

Required. ARN of the source queue (typically a DLQ) from which to move messages.

arn:aws:sqs:us-east-1:123456789012:my-app-dlq

destinationArn

String

Optional. ARN of the destination queue. If not specified, messages move back to their original source queue.

arn:aws:sqs:us-east-1:123456789012:my-app-queue

maxNumberOfMessagesPerSecond

Number

Optional. Maximum messages to move per second (1–500). Use lower values to avoid overwhelming the destination queue.

100

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "taskHandle", "expression": ".response.TaskHandle"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"TaskHandle": "AQEBIYN..."}

success

Boolean

true or false

errorMessage

String

Error message on failure.

List message move tasks

The action identifier is aws.sqs.listMessageMoveTasks.

Lists message move tasks for a source queue and checks their status. Use this action to monitor the progress of DLQ recovery operations.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the source queue is located.

us-east-2

sourceArn

String

Required. ARN of the source queue for which to list tasks.

arn:aws:sqs:us-east-1:123456789012:my-app-dlq

maxResults

Number

Optional. Maximum number of results to return (1–10). Defaults to 10.

10

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "taskStatus", "expression": ".response.Results[0].Status"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"Results": [{"TaskHandle": "...", "Status": "RUNNING", "SourceArn": "...", "ApproximateNumberOfMessagesMoved": 42}]}

success

Boolean

true or false

errorMessage

String

Error message on failure.

Cancel a message move task

The action identifier is aws.sqs.cancelMessageMoveTask.

Cancels a running message move task. Cancellation is not immediate—the task status transitions through CANCELLING before reaching CANCELLED. Messages already moved are not rolled back.

The following table describes the input fields for this action.

Input

Type

Description

Example

awsRoleArn

String

Optional. IAM role ARN to assume for AWS API calls.

arn:aws:iam::123456789012:role/my-workflow-role

awsAccessKeyId

String

Optional. AWS access key ID. Pass as a secret.

${{ :secrets:awsAccessKeyId }}

awsSecretAccessKey

String

Optional. AWS secret access key. Pass as a secret.

${{ :secrets:awsSecretAccessKey }}

awsSessionToken

String

Optional. Temporary session token for STS authentication. Pass as a secret.

${{ :secrets:awsSessionToken }}

region

String

Required. AWS region where the queues are located.

us-east-2

taskHandle

String

Required. Task identifier returned by aws.sqs.startMessageMoveTask. Task handles expire after the task completes.

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "messagesMoved", "expression": ".response.ApproximateNumberOfMessagesMoved"}]

The following table describes the output fields for this action.

Output

Type

Example

response

Object

{"ApproximateNumberOfMessagesMoved": 127}

success

Boolean

true or false

errorMessage

String

Error message on failure.

Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.