'Is there a way to restart an Replication Task in DMS without recreating the task itself?

I'm getting this error when trying to restart my DMS Replication TASK with start_replication_task Boto3 method:

An error occurred (InvalidParameterCombinationException) when calling 
the StartReplicationTask operation: 
Start Type : START_REPLICATION, valid only for tasks running for the first time

To solve that i'm creating a new task every execution, can i restart that with the same task instead?



Solution 1:[1]

you may need to set StartReplicationTaskType to reload-target if you want to restart the task from beginning or resume-processing if you already start task and you want to resume it.

start-replication valid only after you create the task and want to start it

StartReplicationTaskType --> Valid Values: start-replication | resume-processing | reload-target

Ref: https://docs.aws.amazon.com/dms/latest/APIReference/API_StartReplicationTask.html#DMS-StartReplicationTask-request-StartReplicationTaskType

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 tjg184