How do I enable, access, or delete CloudWatch logs for AWS DMS?

Last updated: 2021-02-10

I want to manage the logs for my AWS Database Migration Service (AWS DMS) task. How do I enable, access, or delete Amazon CloudWatch logs for AWS DMS?

Resolution

Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.

Enable logging for a new DMS task

To enable logging for a new AWS DMS task, choose Enable CloudWatch logs when you create a task.

Enable logging for an existing DMS task

To enable logging for an existing task:

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. If the task is in the Failed or Stopped status, then select the task and choose Actions. Choose Modify, and then choose Enable CloudWatch logs.
  3. If the task is in the Running status, you can change the task setting for logging using the AWS CLI. See the example in How do I set up detailed debug logging for my AWS DMS task?
  4. If the AWS Identity and Access Management (IAM) role dms-cloudwatch-logs-role doesn't exist in the AWS account running the task, then follow the steps in Why can't I see CloudWatch Logs for an AWS DMS task?

After you enable logging, you can manage the AWS DMS task logs.

View the logs of a DMS task

To view the logs of a task that has run, follow these steps:

  1. Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
  2. Choose the name of your task.
  3. From the Overview details section, choose View logs.

Delete the logs of a DMS task

To delete logs, follow these steps:

  1. Open the AWS DMS console, and then choose Replication instances from the navigation pane.
  2. Choose the name of the replication instance that hosts your task.
  3. From the Log management section, select the logs you want to delete.
  4. Choose Delete.
  5. Confirm that you want to delete the logs permanently by choosing Delete.

You can also delete AWS DMS logs from the CloudWatch console by following these steps:

  1. Open the CloudWatch console, and then choose Logs from the navigation pane.
  2. Use the Filter field for search for your log files. The log group has the prefix dms.
  3. Choose the log group, and then choose Actions.
  4. Choose Delete log group.
  5. Confirm that you want to delete the logs permanently by choosing Delete.