ListMessageMoveTasks - Amazon Simple Queue Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Gets the most recent message movement tasks (up to 10) under a specific source queue.

  • This action is currently limited to supporting message redrive from dead-letter queues (DLQs) only. In this context, the source queue is the dead-letter queue (DLQ), while the destination queue can be the original source queue (from which the messages were driven to the dead-letter-queue), or a custom destination queue.

  • Currently, only standard queues are supported.

  • Only one active message movement task is supported per queue at any given time.

Request Syntax

{ "MaxResults": number, "SourceArn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


The maximum number of results to include in the response. The default is 1, which provides the most recent message movement task. The upper limit is 10.

Type: Integer

Required: No


The ARN of the queue whose message movement tasks are to be listed.

Type: String

Required: Yes

Response Syntax

{ "Results": [ { "ApproximateNumberOfMessagesMoved": number, "ApproximateNumberOfMessagesToMove": number, "DestinationArn": "string", "FailureReason": "string", "MaxNumberOfMessagesPerSecond": number, "SourceArn": "string", "StartedTimestamp": number, "Status": "string", "TaskHandle": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


A list of message movement tasks and their attributes.

Type: Array of ListMessageMoveTasksResultEntry objects


For information about the errors that are common to all actions, see Common Errors.


One or more specified resources don't exist.

HTTP Status Code: 400


Error code 400. Unsupported operation.

HTTP Status Code: 400



Using Amazon query protocol

The following example query lists the five most recent message movement tasks on MyDeadLetterQueue, which has only two tasks since it was created. The structure of AUTHPARAMS depends on the signature of the API request. For more information, see Examples of Signed Signature Version 4 Requests in the Amazon General Reference.

Sample Request

POST / HTTP/1.1 Host: X-Amz-Date: <Date> Content-Type: application/x-www-form-urlencoded Authorization: <AuthParams> Content-Length: <PayloadSizeBytes> Connection: Keep-Alive Action=ListMessageMoveTasks &SourceArn=arn:aws:sqs:us-east-1:555555555555:MyDeadLetterQueue &MaxResults=5

Sample Response

HTTP/1.1 200 OK <?xml version="1.0"?> <ListMessageMoveTasksResponse xmlns=""> <ListMessageMoveTasksResult> <Result> <ApproximateNumberOfMessagesMoved>50</ApproximateNumberOfMessagesMoved> <ApproximateNumberOfMessagesToMove>0</ApproximateNumberOfMessagesToMove> <DestinationArn>arn:aws:sqs:us-east-1:555555555555:MySourceQueue</DestinationArn> <MaxNumberOfMessagesPerSecond>20</MaxNumberOfMessagesPerSecond> <SourceArn>arn:aws:sqs:us-east-1:555555555555:MyDeadLetterQueue</SourceArn> <StartedTimestamp>1684429053010</StartedTimestamp> <Status>COMPLETED</Status> </Result> <Result> <ApproximateNumberOfMessagesMoved>50</ApproximateNumberOfMessagesMoved> <ApproximateNumberOfMessagesToMove>100</ApproximateNumberOfMessagesToMove> <DestinationArn>arn:aws:sqs:us-east-1:555555555555:MySourceQueue</DestinationArn> <MaxNumberOfMessagesPerSecond>10</MaxNumberOfMessagesPerSecond> <SourceArn>arn:aws:sqs:us-east-1:555555555555:MyDeadLetterQueue</SourceArn> <StartedTimestamp>1684429993999</StartedTimestamp> <Status>RUNNING</Status> <TaskHandle>eyJ0YXNrSWQiOiJkYzE2OWUwNC0wZTU1LTQ0ZDItYWE5MC1jMDgwY2ExZjM2ZjciLCJzb3VyY2VBcm4iOiJhcm46YXdzOnNxczp1cy1lYXN0LTE6MTc3NzE1MjU3NDM2Ok15RGVhZExldHRlclF1ZXVlIn0=</TaskHandle> </Result> <ResponseMetadata> <RequestId>9b20926c-8b35-5d8e-9559-ce1c22e754dc</RequestId> </ResponseMetadata> </ListMessageMoveTasksResult> </ListMessageMoveTasksResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: