I want to manage the Amazon CloudWatch logs for my AWS Database Migration Service (AWS DMS) task.
Resolution
Note: If you receive errors when you run AWS CLI commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.
Turn on logging for a new DMS task
To turn on logging for a new AWS DMS task, choose Enable CloudWatch logs when you create a task.
Turn on logging for an existing DMS task
Complete the following steps:
-
Open the AWS DMS console.
-
In the navigation pane, choose Database migration tasks.
-
If the task is in the Failed or Stopped status, then do the following:
Select the task and then choose Actions.
Choose Modify, and then choose Enable CloudWatch logs.
-
If the task is in the Running status, then run the following modify-replication-task command to change the task setting for logging through the AWS CLI:
aws dms modify-replication-task --replication-task-arn TASK ARN --replication-task-settings '{"Logging":{"EnableLogging":true}}'.
Note: Replace TASK ARN with the Amazon Resource Name (ARN) for your task.
-
Verify that the dms-cloudwatch-logs-role AWS Identity and Access Management (IAM) role exists in the AWS account that runs the task. If the role doesn't exist, then follow the steps in Why can't I see CloudWatch Logs for an AWS DMS task?
Access the logs of a DMS task
For instructions, see Viewing and managing AWS DMS task logs.
Delete the logs of a DMS task through the AWS DMS or CloudWatch console
AWS DMS console
Complete the following steps:
- Open the AWS DMS console, and then choose Replication instances from the navigation pane.
- Select the name of the replication instance that hosts your task.
- From the Log management section, select the logs you want to delete.
- Choose Delete.
- Confirm that you want to delete the logs permanently. Then, choose Delete.
CloudWatch console
Complete the following steps:
- Open the CloudWatch console.
- In the navigation pane, choose Logs.
- Use the Filter field for search for your log files. The log group has the prefix dms.
- Select the log group, and then choose Actions.
- Choose Delete log group.
- Confirm that you want to delete the logs permanently. Then, choose Delete.
Related information
Migrate an on-premises Oracle database to Amazon RDS for PostgreSQL using an Oracle bystander and AWS DMS