Profile Applicability
- Level 2
Description
AWS Database Migration Service (DMS) replication tasks can log activity and diagnostic information for the source database, enabling effective monitoring and troubleshooting. Enabling logging helps identify issues, track performance, and comply with operational best practices by providing detailed logs of task execution.
Rationale
Enhanced Monitoring: Provides insights into task progress, errors, and performance.
Improved Troubleshooting: Simplifies error identification and debugging.
Compliance: Supports operational monitoring requirements and auditing practices.
Impact
Pros:
Ensures visibility into the replication task for the source database.
Facilitates proactive troubleshooting and performance tracking.
Supports adherence to compliance and governance standards.
Cons:
May incur additional costs for storing logs in Amazon CloudWatch.
Requires appropriate configurations to manage and retain logs effectively.
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 associated with the source database.
Under Task Settings, verify if Enable CloudWatch Logs is enabled.
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 includes relevant log types for the source database (e.g., SOURCE_UNLOAD, SOURCE_CAPTURE).
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 SOURCE_UNLOAD,SOURCE_CAPTURE
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 Task settings section.
Disable logging by clearing the CloudWatch Logs or S3 configuration.
Save the changes and confirm that logging is no longer enabled.
Using AWS CLI:
To disable logging, run:
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 running:
aws dms describe-replication-tasks --replication-task-arn <TASK_ARN>