---
title: "Amazon SQS Queues in Nodinite: Monitor, Post, Purge, and Redrive Dead-Letter Queues"
description: "Monitor Amazon SQS queues and dead-letter queues with Nodinite: message count and oldest-message thresholds, and Remote Actions to look at and delete messages, post a message, purge a queue, and redrive a dead-letter queue to its source queues."
---

# :fa-list: Amazon SQS Queues

A queue that fills up means orders, invoices, or shipments waiting for something that has stopped. A dead-letter queue with one message means one transaction failed for good. The :Nodinite: [AWS Monitoring Agent][AWS Agent] watches both, and lets your support team look at the messages, send one, empty a queue, or send failed messages back for another try, all from a [Monitor View][Monitor Views].

* ✅ Warning and Error on the message count and on the age of the oldest message  
* ✅ One message on a dead-letter queue is an Error by default  
* ✅ View, delete, post, purge, and redrive with [Remote Actions][], each confirmed first  

![Details of the SQS queue nodiniteAwsTestSqS: account, region, ARN, type Standard, messages in flight and delayed, visibility timeout, retention period, current values, and the evaluation thresholds with their source (1.0)][1]  
*The **Details** view of a queue: its attributes, **Current values** such as **Messages available**, and the **Evaluation thresholds**, each with its **Source**.*  

## :fa-network-wired: Understanding Queues and Dead-Letter Queues {#understanding}

<div class="mermaid">
graph LR
    Producer["fa:fa-paper-plane Producer"] --> Queue["fa:fa-list SQS Queue<br/>OK, Warning, Error"]
    Queue --> Consumer["fa:fa-gears Consumer"]
    Queue -->|"failed too often"| Dlq["fa:fa-skull-crossbones Dead-Letter Queue<br/>Error at 1 message"]
    Dlq -->|"Start redrive"| Queue
    style Producer fill:#2678BD
    style Queue fill:#93d16d
    style Consumer fill:#2678BD
    style Dlq fill:#c33d34
</div>

*A queue (green when OK) carries messages from a producer to a consumer. A message that fails too often moves to its dead-letter queue (red: Error from the first message, by default). **Start redrive** sends the messages back to their source queues, so the consumers process them again.*

| Category | Which queues | Evaluated |
| --- | --- | --- |
| SQS Queue | Every queue that isn't a dead-letter queue | Message count (Warning 100, Error 1000) and age of the oldest message in seconds (Warning 300, Error 900) |
| SQS Dead-Letter Queue | Every queue that another queue points at with a redrive policy, and every queue whose name matches the **Dead-letter queue name pattern** (by default, names ending in `dlq`, `deadletter`, `dead-letter`, or `dead-letter-queue`, also with `.fifo`) | Message count (Warning 1, Error 1) |

The oldest-message age comes from CloudWatch and is the highest value of the past minutes, so it can stay high right after a purge. The agent therefore only checks the age while there are messages on the queue (visible, in flight, or delayed); an empty queue is back to OK on the next cycle. AWS can take up to a minute to report the new count after a purge. More rules: [Monitoring AWS][].

The account defaults are on the **Thresholds** part of the **SQS** tab in the [Configuration][]:

![The SQS tab of the account configuration, Thresholds part: message count Warning and Error, oldest message age Warning and Error in seconds, and dead-letter message count Warning and Error (1.0)][2]  
*The **Thresholds** part of the **SQS** tab, with the defaults for queues and for dead-letter queues. When a queue reaches both thresholds, Error wins.*  

## :fa-bolt: Remote Actions on a Queue {#queue-actions}

Open the **Action** menu of the queue in a [Monitor View][Monitor Views]. Under **Control Center** it offers **Details**, **Edit**, **View Messages**, **Post**, and **Purge**. Every view has a **Refresh** button, and the queue's name links to it in the AWS console (**View in the AWS Console**).

![The Action menu of an SQS queue in a Monitor View, with Details, Edit, View Messages, Post, and Purge under Control Center (1.0)][3]  
*The **Action** menu of an SQS queue.*  

| Action | What it does | Needs |
| --- | --- | --- |
| **Details** | The queue's attributes, its **Current values** (such as **Messages available**, **Messages in flight**, and **Messages delayed**), and its **Evaluation thresholds** with where each comes from | Read-only policy |
| **Edit** | The thresholds of this queue | Read-only policy |
| **View Messages** | Lists, shows, and deletes messages | `sqs:ReceiveMessage`; deleting also `sqs:DeleteMessage` |
| **Post** | Sends one message | `sqs:SendMessage` |
| **Purge** | Deletes every message on the queue | `sqs:PurgeQueue` |

### Edit {#edit}

Each threshold shows its **Account default**. Enter whole numbers: `0` switches a check off, and an empty field uses the account default. Add a **Description** if you like, and click **Save**. The thresholds apply to this queue only: they are stored in the **Specific** list of the account [Configuration][] and take effect on the next monitoring cycle. **Use account defaults** removes them again.

![The Edit view of an SQS queue: message count and oldest message age thresholds with their account defaults, a Description, the note that they apply to this resource only, and Save (1.0)][4]  
*Thresholds for one queue, each with its account default below the field.*  

### View Messages {#view-messages}

**View Messages** lists the messages that were sent in a date range, **From (UTC)** and **To (UTC)**. It opens on the last 24 hours, and the date fields always show the range the list was made with. Each row shows the **Message id**, **Sent (UTC)**, **Size (bytes)**, and **Receives**.

![The View Messages view of an SQS queue: the note on how messages are received, From (UTC) and To (UTC) for the last 24 hours, Show messages, and an empty Messages list (1.0)][5]  
*The **View Messages** view on an empty queue. **Show messages** lists the messages sent in the date range.*  

* The eye button shows the message body under the row, and hides it again.  
* The bin button deletes that message: *This operation cannot be undone. Are you sure you want to delete this message from the queue?*  
* Tick messages, or the box in the header to select all, and click **Delete selected**. It asks the same before it deletes.  

SQS can't be browsed or searched by date, so the agent receives up to 100 messages without deleting them and filters those: on a busy queue the list is a sample. A message you looked at returns to the queue a few seconds later, but its receive count goes up by one.

### Post {#post}

**Post** sends one message to the queue:

![The Post view of a standard SQS queue: the Message body, Delay (seconds), Message attributes, and Send message (1.0)][6]  
*The **Post** view of a **Standard** queue. A FIFO queue shows **Message group id** and **Message deduplication id** instead of **Delay (seconds)**.*  

| Field | What to enter |
| --- | --- |
| **Message body** | Required. The message, for example a JSON document, sent exactly as entered |
| **Message group id** | **FIFO queue** only, required |
| **Message deduplication id** | **FIFO queue** only, required unless content-based deduplication is on for the queue |
| **Delay (seconds)** | **Standard queue** only, optional, at most 900 |
| **Message attributes** | Optional, one `name=value` per line, at most 10 |

Click **Send message** and confirm: *Are you sure you want to send this message to the queue? The consumers of the queue will process it.*

### Purge {#purge}

**Purge** runs from the **Action** menu itself. :Nodinite: asks first:

![The Execute action? question: Are you sure that you want to execute action Purge on resource nodiniteAwsTestSqS, with Yes and No (1.0)][7]  
*The **Execute action?** question before a purge.*  

**Yes** deletes every message on the queue, and nothing happens on **No**. A purge can't be undone, and AWS can take up to 60 seconds to finish it.

## :fa-skull-crossbones: Remote Actions on a Dead-Letter Queue {#dlq-actions}

| Action | What it does | Needs |
| --- | --- | --- |
| **Details** | Attributes, current values, and thresholds, plus its **Source queues** and its **Redrive tasks** | Read-only policy |
| **Edit** | The thresholds of this dead-letter queue, as for a queue | Read-only policy |
| **Messages** | Peek at the messages on the dead-letter queue, with their body | `sqs:ReceiveMessage` |
| **Start redrive** | Opens **Details**, where **Start redrive** moves the messages back to their source queues | `sqs:StartMessageMoveTask`, plus `sqs:ReceiveMessage` and `sqs:DeleteMessage` on the dead-letter queue and `sqs:SendMessage` on the source queues, because AWS moves them with the caller's rights |
| **Purge** | Deletes every message on the dead-letter queue, as for a queue | `sqs:PurgeQueue` |

**Source queues** lists the queues that send their failed messages here. When the list is empty, the queue is monitored as a dead-letter queue only because its name matches the **Dead-letter queue name pattern**. **Redrive tasks** shows the recent redrives with their **Status**, **Started (UTC)**, **Destination**, **Moved**, **To move**, and **Failure reason**.

**Start redrive** asks *Are you sure you want to move all messages on this dead-letter queue back to their source queues? The messages are processed again by the consumers of those queues.* So fix the cause first. Every action is recorded in [Log Audits][]. The ready-made IAM policies are on [Prerequisites][].

## :fa-hand-point-right: Next Steps

* :fa-bullhorn: [Amazon SNS Topics][]  
* :fa-wrench: [Managing AWS][]  

## :fa-link-horizontal: Related Topics

* :fab fa-aws: [AWS Monitoring Agent][AWS Agent]  
* :fa-traffic-light-go: [Monitoring AWS][]  
* :fa-bolt: [Let Teams Fix It Themselves][Delegate Remote Actions]  

[1]:{ndm}/Documentation%20Pictures/MonitorAgent/AWS/SQSQueue_Details.png
[2]:{ndm}/Documentation%20Pictures/MonitorAgent/AWS/Configuration_SQS_Thresholds.png
[3]:{ndm}/Documentation%20Pictures/MonitorAgent/AWS/SQSQueue_ActionMenu.png
[4]:{ndm}/Documentation%20Pictures/MonitorAgent/AWS/SQSQueue_Edit.png
[5]:{ndm}/Documentation%20Pictures/MonitorAgent/AWS/SQSQueue_ViewMessages.png
[6]:{ndm}/Documentation%20Pictures/MonitorAgent/AWS/SQSQueue_Post_Top.png
[7]:{ndm}/Documentation%20Pictures/MonitorAgent/AWS/SQSQueue_Purge_Confirm.png

[Amazon SNS Topics]:{ndr}/Logging%20and%20Monitoring/AWS/Features/Amazon%20SNS%20Topics.md
[AWS Agent]:{ndr}/Logging%20and%20Monitoring/AWS/Overview.md
[Configuration]:{ndr}/Logging%20and%20Monitoring/AWS/Getting%20started/3.%20Configuration.md
[Delegate Remote Actions]:{ndr}/Getting%20Started/3.%20Monitor/Monitoring%20Strategy/Let%20Teams%20Fix%20It%20Themselves.md
[Log Audits]:{ndr}/Administration/6.%20Tools/2.%20Log%20Audit%20Search.md
[Managing AWS]:{ndr}/Logging%20and%20Monitoring/AWS/Features/Managing%20AWS.md
[Monitor Views]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/What%20is%20a%20Monitor%20View.md
[Monitoring AWS]:{ndr}/Logging%20and%20Monitoring/AWS/Features/Monitoring%20AWS.md
[Prerequisites]:{ndr}/Logging%20and%20Monitoring/AWS/Getting%20started/1.%20Prerequisites.md
[Remote Actions]:{ndr}/Getting%20Started/3.%20Monitor/Remote%20Actions.md