π AWS DMS Migration Task Logging is not enabled π’
- Contextual name: π Migration Task Logging is not enabled π’
- ID:
/ce/ca/aws/dms/migration-task-logging
- Located in: π AWS DMS
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- AWS Security Hub
- [[DMS.7] DMS replication tasks for the target database should have logging enabled]([DMS.7] DMS replication tasks for the target database should have logging enabled (https://docs.aws.amazon.com/securityhub/latest/userguide/dms-controls.html#dms-7)]
- [[DMS.8] DMS replication tasks for the source database should have logging enabled]([DMS.8] DMS replication tasks for the source database should have logging enabled (https://docs.aws.amazon.com/securityhub/latest/userguide/dms-controls.html#dms-8)]
Logicβ
- π§ prod.logic.yaml π’
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-task
command with an updatedSettings
JSON 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)