• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

AWS SQS actions

|View as Markdown

Use these actions to manage Amazon SQS queues and messages.

Prerequisites

For prerequisites and credentials setup, see Set up AWS credentials.

Send a message to an SQS queue

Action identifier: aws.sqs.sendMessage Sends a message to a specified Amazon SQS queue.

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

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

Action identifier: aws.sqs.receiveMessage Retrieves one or more messages from the specified queue.

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"

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

Action identifier: aws.sqs.createQueue Creates a new Amazon SQS queue with specified configuration.

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"}]

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

Action identifier: 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.

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"}]

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

Get SQS queue attributes

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

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"}]

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

Action identifier: aws.sqs.setQueueAttributes Updates one or more attributes of an Amazon SQS queue. All attribute values must be strings, including numeric values.

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"}]

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

Purge an SQS queue

Action identifier: 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.

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"}]

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

List SQS queues

Action identifier: 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.

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 // []"}]

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

Action identifier: 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.

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"}]

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

Tag an SQS queue

Action identifier: 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.

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"}]

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

Action identifier: 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.

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"}]

Output

Type

Example

response

Object

{} (empty on success)

success

Boolean

true or false

errorMessage

String

Error message on failure.

List SQS queue tags

Action identifier: aws.sqs.listQueueTags Lists all tags associated with an Amazon SQS queue.

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"}]

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

Action identifier: 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.

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"}]

Output

Type

Example

response

Object

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

success

Boolean

true or false

errorMessage

String

Error message on failure.

List message move tasks

Action identifier: 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.

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"}]

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

Action identifier: 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.

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"}]

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.