π‘οΈ AWS DMS Migration Task Logging is not enabledπ’
- Contextual name: π‘οΈ Migration Task Logging is not enabledπ’
- ID:
/ce/ca/aws/dms/migration-task-logging - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- AWS Security Hub: [DMS.7] DMS replication tasks for the target database should have logging enabled
- AWS Security Hub: [DMS.8] DMS replication tasks for the source database should have logging enabled
Descriptionβ
Descriptionβ
This policy checks that AWS DMS Replication Tasks have CloudWatch logging enabled for key replication components. It verifies that the following components are configured to emit logs at the default severity level or higher:
TARGET_APPLYβ Data and DDL statements applied to the target database.TARGET_LOADβ Data batches being loaded into the target database.SOURCE_CAPTUREβ Change data capture (CDC) records sourced from the origin database or service and handed off to the DMS sorter.SOURCE_UNLOADβ Data extracted from the source database during full-load operations.DMS supports the following log severity levels, each inclusive of messages from all lower tiers:
LOGGER_SEVERITY_ERRORβ Only error events.LOGGER_SEVERITY_WARNINGβ Warnings and error events.LOGGER_SEVERITY_INFOβ Informational, warning, and error events.LOGGER_SEVERITY_DEFAULTβ Default informational, warning, and error events (equivalent to INFO).LOGGER_SEVERITY_DEBUGβ Debug, informational, warning, and error events.... see more
Remediationβ
Remediationβ
From Command Lineβ
To enable CloudWatch logging for all key components on an existing AWS DMS Replication Task, use the AWS CLIβs
modify-replication-taskcommand with an updatedSettingsJSON payload.Retrieve the current task settingsβ
aws dms describe-replication-tasks \
--filters Name=replication-task-arn,Values={{replication-task-arn}} \
--query "ReplicationTasks[0].ReplicationTaskSettings" \
--output json > {{current-settings}}.jsonUpdate settings to include Loggingβ
{
"Logging": {
"EnableLogging": true,
"LogComponents": [
{
"Component": "TARGET_LOAD",
"Severity": "LOGGER_SEVERITY_DEFAULT"
},
{
"Component": "TARGET_APPLY",
"Severity": "LOGGER_SEVERITY_DEFAULT"
},
{
"Component": "SOURCE_CAPTURE",
"Severity": "LOGGER_SEVERITY_DEFAULT"
},
{
"Component": "SOURCE_UNLOAD",
"Severity": "LOGGER_SEVERITY_DEFAULT"
}
]
}
}Apply the modified settings immediatelyβ
aws dms modify-replication-task \
... [see more](remediation.md)