How do I modify the error handling task settings for an AWS DMS task?

3 minute read
0

I want to know what the error handling task settings for AWS Database Migration Service (AWS DMS) are.

Short description

To change the behavior of a replication task during change data capture (CDC), use error handling settings. Error handling settings can manage errors at the data level, table level, based on the data manipulation language (DML), or based on environmental errors.

Examples of Environmental errors:

  • Connectivity issues between the replication instance and the source or target
  • Task failures because of resource contention on the replication instance
  • Source or target not available

Because environmental issues can be intermittent, AWS DMS reserves capability for automatic resumes, in case of a failure. For more information, see Error handling task settings.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

Use the AWS CLI to modify a task

1.    Open the AWS DMS console.

2.    From the navigation pane, choose Database migration tasks.

3.    If the task that you want to modify is running, then select the task, choose Actions, and then choose Stop.

4.    After the task is stopped, choose the name of your task.

5.    From the Overview details section, expand the Task settings (JSON) section.

6.    Enter the task settings into a JSON editor.

7.    Edit the settings under ErrorBehavior. These example settings set FailOnTransactionConsistencyBreached to true and RecoverableErrorCount to 10.

"ErrorBehavior": {
        "DataErrorPolicy": "LOG_ERROR",
        "DataTruncationErrorPolicy": "LOG_ERROR",
        "DataErrorEscalationPolicy": "SUSPEND_TABLE",
        "DataErrorEscalationCount": 0,
        "TableErrorPolicy": "SUSPEND_TABLE",
        "TableErrorEscalationPolicy": "STOP_TASK",
        "TableErrorEscalationCount": 0,
        "RecoverableErrorCount": 10,
        "RecoverableErrorInterval": 5,
        "RecoverableErrorThrottling": true,
        "RecoverableErrorThrottlingMax": 1800,
        "ApplyErrorDeletePolicy": "IGNORE_RECORD",
        "ApplyErrorInsertPolicy": "LOG_ERROR",
        "ApplyErrorUpdatePolicy": "LOG_ERROR",
        "ApplyErrorEscalationPolicy": "LOG_ERROR",
        "ApplyErrorEscalationCount": 0,
        "ApplyErrorFailOnTruncationDdl": false,
        "FullLoadIgnoreConflicts": true,
        "FailOnTransactionConsistencyBreached": true,
         "FailOnNoTablesCaptured": false

8.    Save the JSON file, and note the Task ARN and file path to use later.

9.    If you haven't already, then install and configure the latest version of the AWS CLI.

10.    Run the modify-replication-task command with the Task ARN and the file path that you noted.
Linux example:

aws dms modify-replication-task --replication-task-arn arn:aws:dms:us-east-1:112345679012:task:123eadf45gtJCVU2IBPzasetg5 --replication-task-settings file://your-task-settings.json

Windows example:

aws dms modify-replication-task --replication-task-arn arn:aws:dms:us-east-1:112345679012:task:123eadf45gtJCVU2IBPzasetg5 --replication-task-settings file://"c:\\temp\\your-task-settings.json"

11.    Return to the AWS DMS console. From the navigation pane, choose Database migration tasks.

12.    Confirm that the task status is Modifying.

13.    Choose the name of your task.

14.    From the Overview details section for your task, expand Task Settings (JSON). Confirm that the ErrorBehavior settings are updated.

Use the AWS DMS console to modify a task

You can also use the AWS DMS console to modify a task. For more information, see Modifying a task.

Related information

Best practices for AWS Database Migration Service

AWS OFFICIAL
AWS OFFICIALUpdated 6 months ago