How can I enable CloudWatch logs so that I can monitor an AWS DMS task?

Last updated: 2018-09-18

How can I enable Amazon CloudWatch logging so that I can monitor an an AWS Database Migration Service (AWS DMS) task?

Short Description

You can use CloudWatch logs to monitor the progress of your DMS task, the resources used, and the network activity used. You can monitor an AWS DMS task by using the AWS DMS console, the AWS Command Line Interface (AWS CLI), or the AWS DMS API.

Resolution

Enable task logging

To modify a DMS task, the task must be in a stopped or failed state.

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. Select your task, choose Actions, and then choose Modify.
  3. From the Task Settings pane, choose Enable CloudWatch logs.
  4. Choose Save.

Check the task status

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. Choose the name of the task that you want to monitor.
  3. From the Table Statistics pane, review the values in the columns for Tables loaded, Tables loading, Tables queued, and Tables errored.

For more information about the status of your task, see Task Status.

Monitor the task's progress

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. Choose the name of the task that you want to monitor.
  3. From the Table statistics pane, check the Load state column.

View the Amazon CloudWatch metrics

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. Chose the name of the task that you want to review.
  3. From the Overview details pane, choose View logs.
  4. Return to the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  5. Choose the name of the task you want to monitor.
  6. From Migration task metrics, view the metrics for your task.
  7. Check the metrics for CDCLatencySource and CDCLatencyTarget to identify potential latency in the source or target. For more information, see Monitoring Replication Tasks Using Amazon CloudWatch.

View the table state

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. Chose the name of the task that you want to review.
  3. From the Overview details pane, you can see the Basic configuration and Task settings for your task.

View the replication instance state

  1. Open the AWS DMS console, and then choose Replication instances from the navigation pane.
  2. Choose the name of the replication instance in use.
  3. From the Migration task metrics pane, review the metrics for CPU utilization, freeable memory, free storage space, and SWAP usage.

Use advanced settings

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. Select your task, choose Actions, and then choose Modify.
  3. Expand Advanced task settings.
  4. In the Create control table in target using schema field, enter the name of your schema on the target database where AWS DMS can create its control tables.
  5. In the History timeslot (minutes), enter the amount of time you want each history record to stay in the replication history table.
  6. In the Enable control table section, for Apply Exceptions, wsdms_apply_exceptions is always enabled. Optionally, you can add the following control tables to monitor additional details about the task:
    Replication Status - awsdms_status
    Suspended Tables - awsdms_suspended_tables
    Replication History - awsdms_history
    Note: These control tables are created in the target instance, and they can be viewed only by using a SELECT query in the target control schema in the target database instance.

Did this article help you?

Anything we could improve?


Need more help?