Profile Applicability
- Level 2
Description
AWS Database Migration Service (DMS) replication tasks can generate logs that provide valuable insights into task performance, errors, and debugging information. Enabling logging ensures that you can monitor and troubleshoot replication tasks effectively, improving reliability and compliance with operational best practices.
Rationale
Enhanced Monitoring: Provides detailed information about task execution and potential issues.
Improved Troubleshooting: Simplifies debugging by capturing task logs.
Compliance: Aligns with best practices for operational monitoring and auditing.
Impact
Pros:
Enables proactive monitoring and issue resolution.
Improves visibility into replication task performance.
Supports compliance with operational and security standards.
Cons:
May incur additional costs for storing logs in Amazon CloudWatch.
Requires proper configuration to avoid excessive log generation.
Default Value
By default, logging is not enabled for DMS replication tasks. It must be explicitly configured.
Pre-Requisite
IAM Permissions Required:
dms:DescribeReplicationTasks
dms:ModifyReplicationTask
logs:PutLogEvents
AWS CLI installed and configured.
Remediation
Test Plan:
Using AWS Console:
Sign in to the AWS Management Console.
Navigate to Database Migration Service (DMS) > Replication Tasks.
Select the replication task to check its configuration.
Under the Task Settings section, verify if Enable CloudWatch Logs is selected.
Using AWS CLI:
Describe the replication task:
aws dms describe-replication-tasks --filters Name=replication-task-id,Values=<task-id>
Check the EnableCloudWatchLogsExports field in the output. Ensure it is set to true.
Implementation Steps:
Using AWS Console:
Navigate to Database Migration Service (DMS) > Replication Tasks.
Select the replication task to update.
Click Modify and enable CloudWatch Logs under the Task Settings section.
Save the changes.
Using AWS CLI:
Enable logging for the replication task:
aws dms modify-replication-task \ --replication-task-arn <task-arn> \ --enable-cloudwatch-logs-exports
Verify the updated configuration:
aws dms describe-replication-tasks --filters Name=replication-task-id,Values=<task-id>
Backout Plan
Using AWS Console:
If enabling logging causes issues, sign in to the AWS Management Console.
Navigate to AWS DMS, select the replication task, and go to the Modify settings.
Remove or disable the logging configuration by clearing the CloudWatch Logs or S3 configuration.
Save the changes and verify that logging is no longer enabled.
Using AWS CLI:
To disable logging for a replication task, run the following command:
aws dms modify-replication-task --replication-task-arn <TASK_ARN> --cloudwatch-log-stream-arn "" --cloudwatch-log-group-arn ""
Verify that logging has been disabled by retrieving the task details:
aws dms describe-replication-tasks --replication-task-arn <TASK_ARN>