How do I set up detailed debug logging for my AWS DMS task?

Last updated: 2019-08-23

What types of logging are available for AWS Database Migration Service (AWS DMS) tasks? How do I enable detailed debug logging for an AWS DMS task?

Resolution

To monitor your AWS DMS task, you can modify the logging task settings to specify which component activities and severity values are logged. The following example uses the most detailed level of debug logging: LOGGER_SEVERITY_DETAILED_DEBUG. Detailed debug logging requires a large amount of storage space. If you are using ongoing replication, also known as change data capture (CDC), the log entries might consume the rest of your storage space.

1.    Open the AWS DMS console, and then choose Database migration tasks in the navigation pane.

2.    Choose your task. If the task is running, choose Actions, and then choose Stop.

3.    From the Overview details section, expand the Task Settings (JSON) section, and then copy and paste the task settings into a JSON editor.

4.    Edit the Severity setting of each log component that you want to enable detailed debug logging on by replacing "LOGGER_SEVERITY_DEFAULT" (or any other setting) with "LOGGER_SEVERITY_DETAILED_DEBUG". The "SOURCE_UNLOAD" and "TARGET_LOAD" log components are for full load tasks only. "SOURCE_CAPTURE" and "TARGET_APPLY" are for ongoing replication (CDC) tasks.

Example

"LogComponents": [
      {
        "Id": "SOURCE_UNLOAD",
        "Severity": "LOGGER_SEVERITY_DEFAULT"
      },
      {
        "Id": "SOURCE_CAPTURE",
        "Severity": "LOGGER_SEVERITY_DETAILED_DEBUG"
      },
      {
        "Id": "TARGET_LOAD",
        "Severity": "LOGGER_SEVERITY_DEFAULT"
      },
      {
        "Id": "TARGET_APPLY",
        "Severity": "LOGGER_SEVERITY_DETAILED_DEBUG"
      },
      {
        "Id": "TASK_MANAGER",
        "Severity": "LOGGER_SEVERITY_DEFAULT"
      }
    ]

5.    Save the JSON file, and note the Task ARN and file path for use later.

6.    Install and configure the latest version of the AWS Command Line Interface (AWS CLI).

7.    Run the modify-replication-task AWS CLI command, using your Task ARN and the path of the file that you saved in step five.

Linux example

aws dms modify-replication-task --replication-task-arn arn:aws:dms:us-east-1:123456789012:task:2PVREMWNPGYJCVU2IBPTOYTIV4 --replication-task-settings file://your-task-settings.json

Windows example

aws dms modify-replication-task --replication-task-arn arn:aws:dms:us-east-1:123456789012:task:2PVREMWNPGYJCVU2IBPTOYTIV4 --replication-task-settings file://"c:\temp\your-task-settings.json"

Note: To find your Task ARN, open the AWS DMS console, and choose Database migration tasks from the navigation pane. The Task ARN appears in the Overview details section. For more information, see Constructing an Amazon Resource Name (ARN) for AWS DMS.

8.    Open the AWS DMS console, and choose Database migration tasks from the navigation pane.

9.    Confirm that the task status is Modifying.

10.    From the Overview details section for your task, under Task Settings, confirm that the Severity setting is LOGGER_SEVERITY_DETAILED_DEBUG for each log component that you modified.

The next time that you run this task, you'll get detailed debug logs.