How to reprocess messages from an SQS dead-letter queue?

A company has an application that uses an AWS Lambda function to consume messages from an Amazon Simple Queue Service (Amazon SQS) queue. The SQS queue is configured with a dead-letter queue. Due to a defect in the application, AWS Lambda failed to process some messages. A developer fixed the bug and wants to process the failed messages again. How should the developer resolve this issue?

  1. Use the SendMessageBatch API to send messages from the dead-letter queue to the original SQS queue.
  2. Use the ChangeMessageVisibility API to configure messages in the dead-letter queue to be visible in the original SQS queue.
  3. Use the StartMessageMoveTask API to move messages from the dead-letter queue to the original SQS queue. Source Reference Answer
  4. Use the PurgeQueue API to remove messages from the dead-letter queue and return the messages to the original SQS queue.

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This question tests the specific API used for redriving messages from a DLQ; the trap is confusing message visibility settings with inter-queue message movement.

To reprocess failed messages from an Amazon SQS dead-letter queue (DLQ), developers should utilize the StartMessageMoveTask API. The community consensus confirms this is the most efficient method for redriving messages back to the original queue.

Choosing `ChangeMessageVisibility` is a frequent error because it sounds like it makes messages available, but it only adjusts the timeout within the same queue rather than moving them.

Community Discussion (4 comments)

devmo 👍 1 Selected: C
If answer is C, why does it show as A?
raeIT 👍 1
vote C
siheom 👍 2 Selected: C
VOTE C
gdm83 👍 1
C StartMessageMoveTask: This API is specifically designed for moving messages between SQS queues, including moving messages from a dead-letter queue (DLQ) back to the original queue. This method is efficient and preserves message attributes and other metadata.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The StartMessageMoveTask API is the designated AWS method for moving messages from a dead-letter queue (DLQ) back to the original source queue. It efficiently handles the transfer while preserving message attributes and metadata, allowing the fixed Lambda function to reprocess them correctly.

Why the Other Options Are Wrong

SendMessageBatch requires manually retrieving messages from the DLQ and sending them again, which is inefficient and more complex than the native move task. ChangeMessageVisibility only alters the timeout for a message within the same queue and does not transfer it to another. PurgeQueue permanently deletes messages from the DLQ and does not return them to the source queue.

Community Comment Notes

Community members strongly support Option C, noting that this API is specifically designed for moving messages between queues, including from a DLQ. Comments emphasize the efficiency of this method compared to manual alternatives.

Official Reference

Exam Strategy

When facing questions about SQS dead-letter queues, look for specific 'Move' or 'Redrive' APIs rather than generic send or visibility commands. Remember that purging a queue permanently deletes data and cannot be used to recover messages.

Related Analysis

Practice All DVA-C02 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DVA-C02 Practice Test →

← Back to DVA-C02 Study Guide