How do I set up detailed debug logging for my AWS DMS task?
What types of logging are available for AWS Database Migration Service (AWS DMS) tasks? How do I turn on detailed debug logging for an AWS DMS task?
"What types of logging are available for AWS Database Migration Service (AWS DMS) tasks? How do I turn on detailed debug logging for an AWS DMS task?Short descriptionThere are three ways to turn on detailed debug logging for an AWS DMS task:Using the AWS DMS console wizardUsing the AWS DMS console to manually update the settings in the JSON editorUsing the AWS Command Line Interface (AWS CLI)Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent AWS CLI version.ResolutionUse the AWS console wizard1.    Open the AWS DMS console, and then choose Database migration tasks in the navigation pane.2.    Choose your task.3.    Under Task Setting, for Editing mode, select Wizard.4.    Confirm that the Enable CloudWatch logs checkbox is selected.5.    Change the Severity of the five standard loggers in the drop-down list, as required.The next time that you run this task, you'll get detailed debug logs.Note: In addition to the five standard loggers available in the AWS DMS console, you can turn on detailed debugging for all AWS DMS loggers. To do this, modify the task. In the Task settings JSON editor, for LogComponents, change the Severity as required.Using the AWS console to manually update the settings in the JSON editorNote: You can turn on detailed debugging using the AWS DMS console when you create or modify a DMS task. To do this, access the JSON editor in your Task settings. For LogComponents, change the Severity, as required.To monitor your AWS DMS task, you can modify the logging task settings and specify which component activities and severity values are logged. The following example uses the most detailed level of debug logging: LOGGER_SEVERITY_DETAILED_DEBUG. Detailed debug logging requires a large amount of storage space. If you are using ongoing replication, also known as change data capture (CDC), the log entries might consume the rest of your storage space.1.    Open the AWS DMS console, and then choose Database migration tasks in the navigation pane.2.    Choose your task.3.    From the Overview details section, expand the Task Settings (JSON) section. Then, copy and paste the Logging section of task settings into a JSON editor.4.     Edit the Severity setting of each log component that you want to turn on detailed debug logging. To set the severity, replace LOGGER_SEVERITY_DEFAULT with LOGGER_SEVERITY_DETAILED_DEBUG.For example:{"Logging": {"EnableLogging": true,"LogComponents": [{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "TRANSFORMATION"},{"Severity": "LOGGER_SEVERITY_DEBUG","Id": "SOURCE_UNLOAD"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "IO"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "TARGET_LOAD"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "PERFORMANCE"},{"Severity": "LOGGER_SEVERITY_DETAILED_DEBUG","Id": "SOURCE_CAPTURE"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "SORTER"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "REST_SERVER"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "VALIDATOR_EXT"},{"Severity": " LOGGER_SEVERITY_INFO","Id": "TARGET_APPLY"},{"Severity": " LOGGER_SEVERITY_DEBUG","Id": "TASK_MANAGER"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "TABLES_MANAGER"},{"Severity": "LOGGER_SEVERITY_DETAILED_DEBUG","Id": "METADATA_MANAGER"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "FILE_FACTORY"},{"Severity": "LOGGER_SEVERITY_DETAILED_DEBUG ","Id": "COMMON"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "ADDONS"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "DATA_STRUCTURE"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "COMMUNICATION"},{"Severity": "LOGGER_SEVERITY_DEFAULT","Id": "FILE_TRANSFER"}],"CloudWatchLogGroup": null,"CloudWatchLogStream": null}}5.     Choose Save.Using the AWS CLI1.    Install and configure the latest version of the AWS CLI.2.    Open the AWS DMS console, and then choose Database migration tasks in the navigation pane.3.    Choose your task. Then, choose the Overview tab.4.    Copy the Task Settings (JSON) and save it locally as a .json file.5.    Turn on CloudWatch logging.6.    Run the modify-replication-task AWS CLI command, using your Task ARN and the and the JSON settings that you saved in step.Note: In the following examples, replaceyour-task-settings.json with the name of your saved file.Linux example:aws dms modify-replication-task --replication-task-arn arn:aws:dms:us-east-1:123456789012:task:2PVREMWNPGYJCVU2IBPTOYTIV4 --replication-task-settings file://your-task-settings.jsonWindows example:aws dms modify-replication-task --replication-task-arn arn:aws:dms:us-east-1:123456789012:task:2PVREMWNPGYJCVU2IBPTOYTIV4 --replication-task-settings file://"c:\temp\your-task-settings.json"Note: To find your Task ARN, open the AWS DMS console , and choose Database migration tasks from the navigation pane. The Task ARN appears in the Overview details section. For more information, see Constructing an Amazon Resource Name (ARN) for AWS DMS.7.    Open the AWS DMS console, and choose Database migration tasks from the navigation pane.8.    Confirm that the task status is Modifying.9.    From the Overview details section for your task, under Task Settings, confirm that the Severity setting is LOGGER_SEVERITY_DETAILED_DEBUG for each log component that you modified.The next time that you run this task, you'll get detailed debug logs.Related informationViewing and managing AWS DMS task logsFollow"