StartMessageMoveTask - 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).


Starts an asynchronous task to move messages from a specified source queue to a specified destination queue.

  • This action is currently limited to supporting message redrive from queues that are configured as dead-letter queues (DLQs) of other Amazon SQS queues only. Non-SQS queue sources of dead-letter queues, such as Amazon Lambda or Amazon SNS topics, are currently not supported.

  • In dead-letter queues redrive context, the StartMessageMoveTask the source queue is the 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.

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

Request Syntax

{ "DestinationArn": "string", "MaxNumberOfMessagesPerSecond": 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 ARN of the queue that receives the moved messages. You can use this field to specify the destination queue where you would like to redrive messages. If this field is left blank, the messages will be redriven back to their respective original source queues.

Type: String

Required: No


The number of messages to be moved per second (the message movement rate). You can use this field to define a fixed message movement rate. The maximum value for messages per second is 500. If this field is left blank, the system will optimize the rate based on the queue message backlog size, which may vary throughout the duration of the message movement task.

Type: Integer

Required: No


The ARN of the queue that contains the messages to be moved to another queue. Currently, only ARNs of dead-letter queues (DLQs) whose sources are other Amazon SQS queues are accepted. DLQs whose sources are non-SQS queues, such as Amazon Lambda or Amazon SNS topics, are not currently supported.

Type: String

Required: Yes

Response Syntax

{ "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.


An identifier associated with a message movement task. You can use this identifier to cancel a specified message movement task using the CancelMessageMoveTask action.

Type: String


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 starts a message move task on a dead-letter queue MyDeadLetterQueue to its source queue, with a limit of 10 messages per second. 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=StartMessageMoveTask &SourceArn=arn:aws:sqs:us-east-1:555555555555:MyDeadLetterQueue &MaxNumberOfMessagesPerSecond=10

Sample Response

HTTP/1.1 200 OK <?xml version="1.0"?> <StartMessageMoveTaskResponse xmlns=""> <StartMessageMoveTaskResult> <TaskHandle>eyJ0YXNrSWQiOiJkYzE2OWUwNC0wZTU1LTQ0ZDItYWE5MC1jMDgwY2ExZjM2ZjciLCJzb3VyY2VBcm4iOiJhcm46YXdzOnNxczp1cy1lYXN0LTE6MTc3NzE1MjU3NDM2Ok15RGVhZExldHRlclF1ZXVlIn0=</TaskHandle> </StartMessageMoveTaskResult> <ResponseMetadata> <RequestId>9b20926c-8b35-5d8e-9559-ce1c22e754dc</RequestId> </ResponseMetadata> </StartMessageMoveTaskResponse>

See Also

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