DMS Replication Task Auditor
Mindset
One-line takeaway: the verdict is always the first failing dimension
in priority order — and three DMS-specific traps are in a class of their own:
SslMode: none (plaintext data pipe), EnableLogging: false (silent task
failures), and PubliclyAccessible: true (internet-exposed credential store).
DMS sits between a source and target database — it IS the data pipe for a
migration. Three things make it dangerous when misconfigured:
SslMode: none means plaintext replication traffic. DMS reads every
row from the source and writes it to the target. Without TLS, every column
value — credentials, PII, financial records — traverses the network in
plaintext. This is not an add-on — it is the pipe itself.
EnableLogging: false makes task failures invisible. DMS emits
CloudWatch metrics regardless (CDC latency, throughput), but metrics show
a healthy task while logs reveal FK constraint failures, data truncation,
and connection drops. An operator monitoring metrics alone sees green
while data is silently lost.
PubliclyAccessible: true exposes the replication instance. The
instance stores database credentials for both source and target. A public
instance is an internet-reachable credential store.
Quick reference — verdict thresholds
| Condition |
Verdict |
Step |
Any endpoint SslMode: none or missing |
NO_TLS |
Step 1 |
TaskSettings logging disabled or absent |
NO_LOGGING |
Step 2 |
Endpoint SslMode: require (no cert verification) |
CONFIG_GAP |
Step 1 |
Instance PubliclyAccessible: true |
CONFIG_GAP |
Step 3 |
Instance MultiAZ: false on CDC/full-load-and-cdc task |
CONFIG_GAP |
Step 3 |
Endpoint missing KmsKeyId |
CONFIG_GAP |
Step 4 |
| Task missing validation settings |
CONFIG_GAP |
Step 4 |
| All dimensions pass |
OK |
Step 5 |
Verdict priority (first match wins): NO_TLS > NO_LOGGING > CONFIG_GAP > OK.
All findings are still enumerated regardless of verdict — the verdict
identifies the worst dimension, not the only one.
Pre-flight: task metadata gate
Before evaluating settings, classify the task itself. Several attributes
short-circuit or redirect the audit.
Live-account pre-flight (skip for offline config audit):
- Verify the caller can run
dms:DescribeReplicationTasks and
dms:DescribeEndpoints — read-only auditor roles should have these.
Remediation requires dms:ModifyReplicationInstance and
dms:ModifyEndpoint — surface this BEFORE the operator approves.
- Confirm
TaskSettings is a serialized JSON string in the API response,
not a parsed object. Parse with json.loads() before evaluating
EnableLogging, LogLevel, ValidationSettings, etc.
- Snapshot both endpoint configs (
describe-endpoints) BEFORE any
modification — endpoint changes are not versioned and there is no undo.
- Pagination:
describe-endpoints and describe-replication-tasks
return at most 100 records per page. Use --marker from the prior
response to page through. Iterating only the first page silently misses
the long tail of tasks and endpoints.
| Attribute |
Effect on audit |
MigrationType: full-load |
Full-load only — CDC position management is N/A. Logging still required. |
MigrationType: cdc |
CDC only — CDC position continuity and logging are critical. |
MigrationType: full-load-and-cdc |
Both phases — highest risk (CDC inherits all full-load issues). |
Status: stopped/failed |
Note as operational risk but still audit config — a stopped task with bad config will fail on restart. |
Target EngineName: s3 |
S3 target has no SslMode — HTTPS is enforced by the SDK. Check SSE in S3Settings. Do NOT flag missing SslMode. |
If the task or endpoint config is malformed (invalid JSON, missing required
fields), output:
TASK: <task-id>
VERDICT: ERROR
REASON: Task or endpoint configuration is not valid — cannot classify.
REMEDIATION: Re-fetch with aws dms describe-replication-tasks --filters Name=replication-task-id,Values=<id> --output json.
Process — Classification logic (apply in order, first match wins)
Step 0: Expert knowledge — non-obvious DMS behaviors that change classification
Each of these will produce a wrong verdict if ignored:
Missing SslMode defaults to none. The DMS API does not require
SslMode in the endpoint configuration. When absent, DMS connects without
SSL — plaintext. The console may display this as blank rather than "none",
making it easy to overlook. Treat a missing SslMode identically to
SslMode: none.
SslMode: require encrypts but does NOT verify certificates. The
connection uses TLS but does not check the server certificate against a
trusted CA, leaving it vulnerable to man-in-the-middle (MITM) attacks.
Only verify-ca (validates certificate chain) and verify-full (validates
certificate + hostname) provide real TLS security. require is a
CONFIG_GAP — encryption present, certificate trust absent.
KmsKeyId on a DMS endpoint encrypts stored config, NOT transit data.
The KMS key encrypts the endpoint configuration stored by DMS (including
connection credentials). It does NOT encrypt data flowing between source
and target. Data-in-transit is controlled solely by SslMode. These are
independent dimensions — do not conflate a KMS-encrypted endpoint with a
TLS-encrypted connection.
S3 target endpoints have no SslMode. S3 targets use HTTPS by default
(enforced by the AWS SDK). Do NOT flag an S3 target for missing SslMode —
it is expected. The source endpoint is still evaluated normally.
DMS CloudWatch metrics are always on; Logs are opt-in. Even with
EnableLogging: false, DMS emits CloudWatch metrics (CDC latency, task
throughput, CPU utilization). An operator watching the DMS console sees a
green task while the logs would reveal foreign-key constraint failures,
data truncation, and connection drops. Metrics lie; logs tell the truth.
EnableLogging is nested inside the TaskSettings JSON string. The
boolean lives at TaskSettings.Logging.EnableLogging (or top-level
EnableLogging in older format). A common audit error is checking the
task's top-level Status field — that reflects running/stopped state, not
log emission.
Single-AZ replication instances lose CDC position on instance failure.
Without Multi-AZ, a replication instance failure requires re-establishing
CDC from the last checkpoint in the recovery table. If the source has
rotated binlogs/transaction logs past the checkpoint, CDC cannot resume —
a full reload is required. Multi-AZ maintains a hot standby with current
CDC position.
PubliclyAccessible: true is the default in some IaC templates.
CloudFormation and CDK templates for DMS replication instances may default
to PubliclyAccessible: true when VPC settings are specified without
explicitly setting it to false. The instance then receives a public IP.
Always verify this flag — the instance stores database credentials.
TaskSettings is a JSON string, not a structured object in the API.
describe-replication-tasks returns ReplicationTaskSettings as a
serialized JSON string. Treating it as already-parsed leads to attribute
errors. Always json.loads() before evaluating nested settings.
verify-ca vs verify-full are not interchangeable. verify-ca
validates the certificate chain but NOT the hostname. verify-full
validates both. A MITM attack with a valid-but-wrong-domain certificate
passes verify-ca but fails verify-full. For database migrations, always
recommend verify-full.
EnableLogging: true does NOT guarantee logs are written. DMS requires
the dms-cloudwatch-logs-role service role with logs:CreateLogGroup,
logs:CreateLogStream, and logs:PutLogEvents to emit CloudWatch Logs. If
the role is missing or lacks permissions, DMS silently drops logs — the
task reports running and EnableLogging: true, but no log groups appear.
Always verify the role exists when remediating NO_LOGGING.
verify-full requires the CA certificate bundle on the instance. When
using SslMode: verify-full with a self-signed or private-CA database
certificate, the CA bundle must be imported into the replication instance
(--certificate-arn on the endpoint). Without it, the task enters STOPPED
with a generic connection error that masquerades as a TLS issue.
Cross-account endpoint access requires BOTH network and IAM paths. When
the source or target database is in a different AWS account, the replication
instance needs VPC peering or Transit Gateway connectivity AND the database
security group must allow inbound from the instance's subnet CIDR. A common
misconfiguration is correct routing but a security group blocking the DMS
instance — the task fails with a connection timeout that looks like a TLS
error.
EngineVersion gates feature support. DMS replication instance
EngineVersion determines supported features. Versions before 3.4.x do not
support CDC for MongoDB/DocumentDB; versions before 3.1.x lack Babelfish
target support. An unsupported engine/version combination produces silent
CDC lag — the task reports running but no data flows. Verify EngineVersion
compatibility when auditing CDC tasks on non-standard engines.
DMS task IAM role over-privilege is a hidden blast radius. The IAM role
assumed by DMS for endpoint access often accumulates broad permissions
(dms:* or rds-db:* on *). While this does not change the task
verdict, it widens the credential blast radius if the replication instance
is compromised. Flag the task IAM role for least-privilege review alongside
the task config audit.
Step 1: TLS / SSL evaluation (highest priority — plaintext data pipe)
For each endpoint (source and target, except S3 targets), evaluate SslMode:
| SslMode |
Classification |
Reason |
none |
NO_TLS |
Plaintext — all data flows unencrypted between source and target. |
| missing |
NO_TLS |
Defaults to none — treated identically to explicit plaintext. |
require |
CONFIG_GAP (additive) |
TLS present but no certificate verification — MITM possible. |
verify-ca |
OK for TLS dimension |
Certificate chain validated. |
verify-full |
OK for TLS dimension |
Certificate + hostname validated — strongest TLS posture. |
Priority rule: if ANY endpoint (source or target) has SslMode: none or
missing, the task verdict is NO_TLS — do not continue to Step 2 unless
enumerating additional findings. The data pipe is plaintext regardless of how
well-configured the other endpoint is.
S3 target exception: S3 target endpoints (EngineName: s3) do not have
SslMode — HTTPS is enforced by the AWS SDK. Do NOT classify the target as
NO_TLS for missing SslMode. The source endpoint is still evaluated.
Self-managed source on EC2: If the source is a self-managed database on
EC2, SslMode: none means traffic flows over the VPC network. For cross-VPC
or cross-account migrations, this traffic traverses peering or Transit
Gateway — still unencrypted. Flag as NO_TLS regardless of network topology.
Step 2: Logging evaluation (second priority — silent failures)
Parse TaskSettings (JSON string to object) and evaluate the logging
configuration:
| Condition |
Classification |
Reason |
EnableLogging: false |
NO_LOGGING |
No CloudWatch Logs — task failures invisible. |
EnableLogging absent from TaskSettings |
NO_LOGGING |
Same as false — DMS does not enable logging by default. |
EnableLogging: true + LogLevel: default |
CONFIG_GAP (additive) |
Minimal output. Upgrade to info or warning for audit trail. |
EnableLogging: true + LogLevel: info/warning + LogComponents populated |
OK |
Sufficient for audit trail. |
The metrics-vs-logs trap: DMS emits CloudWatch metrics regardless of
EnableLogging. An operator monitoring CDCLatencySource or
FullLoadThroughputBandwidth sees normal values while logs would reveal data
loss. EnableLogging: false is a silent failure amplifier — the task looks
healthy while data integrity degrades.
Step 3: Replication instance configuration
Evaluate the replication instance backing the task:
| Condition |
Classification |
Reason |
PubliclyAccessible: true |
CONFIG_GAP (additive) |
Instance has public IP — internet-reachable credential store. |
MultiAZ: false on cdc or full-load-and-cdc task |
CONFIG_GAP (additive) |
No hot standby — CDC position lost on failure requires full reload. |
MultiAZ: false on full-load-only task |
OK for this dimension |
Full-load restarts from scratch — Multi-AZ beneficial but not critical. |
KmsKeyId absent on instance |
CONFIG_GAP (additive) |
Instance storage unencrypted. |
ReplicationInstanceClass: dms.t2.* / dms.t3.micro on CDC task |
CONFIG_GAP (additive) |
Burstable — CPU credits deplete under sustained CDC, causing latency spikes. |
Multi-AZ nuance: In DMS, the Multi-AZ standby maintains CDC replication
position but does NOT serve as an active replica. On failover, DMS
automatically promotes the standby — no operator intervention needed. Without
Multi-AZ, the task enters STOPPED state on instance failure and requires
manual restart with potential CDC position loss.
Step 4: Endpoint encryption and task settings integrity
Evaluate endpoint-level encryption and task-level integrity controls:
| Condition |
Classification |
Reason |
Endpoint KmsKeyId absent |
CONFIG_GAP (additive) |
Endpoint config (including credentials) stored unencrypted by DMS. |
ValidationSettings.EnableValidation: false or absent |
CONFIG_GAP (additive) |
No automated data-integrity check — row mismatches undetected. |
RecoveryTable absent on CDC task |
CONFIG_GAP (additive) |
CDC checkpoint in memory only — lost on reboot, requires full reload. |
DeletionProtection: false or absent |
CONFIG_GAP (additive) |
Task can be deleted via CLI — loses CDC position and migration state. |
Validation importance: DMS task validation compares source and target row
counts and (optionally) data contents after migration. Without it, you have no
automated mechanism to detect silent data loss — a row that fails to replicate
due to a constraint violation appears normal in metrics.
Step 5: Aggregation — first failing dimension wins (priority order)
if any finding == NO_TLS: verdict = NO_TLS
elif any finding == NO_LOGGING: verdict = NO_LOGGING
elif any finding == CONFIG_GAP: verdict = CONFIG_GAP
else: verdict = OK
All findings are enumerated in the output regardless of verdict. A task with
NO_TLS may also have logging and config findings — the operator needs the
full picture, not just the worst dimension.
Output format (per task)
TASK: <replication-task-id or ARN>
VERDICT: NO_TLS | NO_LOGGING | CONFIG_GAP | OK
REASON: <1-2 sentences citing the worst finding and step number>
FINDINGS:
- [NO_TLS] <finding description (Step N)>
- [CONFIG_GAP] <finding description (Step N)>
- [OK] <dimension that passed>
REMEDIATION: <specific action per finding, or "None required" if OK>
Worked example — NO_TLS with compounding findings
TASK: arn:aws:dms:us-east-1:111111111111:task:prod-migration-task
VERDICT: NO_TLS
REASON: Source endpoint (MySQL) has SslMode none — all replicated data flows
in plaintext between source and target (Step 1). Logging is enabled but task
validation is absent, compounding the risk.
FINDINGS:
- [NO_TLS] Source endpoint SslMode is none — plaintext data in transit (Step 1)
- [CONFIG_GAP] ValidationSettings.EnableValidation absent — no data-integrity check (Step 4)
- [OK] Target endpoint SslMode is verify-full (Step 1)
- [OK] EnableLogging is true with LogLevel info (Step 2)
REMEDIATION:
1. NO_TLS — Modify source endpoint SslMode to verify-full:
aws dms modify-endpoint --endpoint-arn <source-arn> --ssl-mode verify-full.
2. CONFIG_GAP — Enable task validation:
aws dms modify-replication-task --replication-task-arn <task-arn>
--replication-task-settings '{"ValidationSettings":{"EnableValidation":true}}'.
Anti-Patterns — NEVER
NEVER classify an endpoint with SslMode: require as NO_TLS. The connection
IS encrypted — it just lacks certificate verification. require is a
CONFIG_GAP. Conflating encryption-present with encryption-absent produces
alert fatigue.
NEVER flag an S3 target endpoint (EngineName: s3) for missing SslMode.
S3 targets use HTTPS by default (AWS SDK enforced). The SslMode field is
not applicable. Flagging it is a false positive.
NEVER treat KmsKeyId on a DMS endpoint as equivalent to data-in-transit
encryption. The KMS key encrypts the endpoint configuration stored by DMS
(credentials, connection string), NOT data flowing between databases.
Only SslMode controls transit encryption.
NEVER assume a DMS task is healthy because CloudWatch metrics show normal
values. Metrics are always emitted regardless of EnableLogging. The
metrics-vs-logs trap means CDCLatencySource can look fine while logs
reveal data loss. Always check EnableLogging, not metrics.
NEVER overlook PubliclyAccessible: true on a replication instance. The
instance stores database credentials for both source and target. A public
instance is an internet-reachable credential store.
NEVER classify MultiAZ: false as a finding on a full-load-only task.
Full-load tasks restart from the beginning on failure — Multi-AZ is
beneficial but not critical. Only flag Multi-AZ absence on cdc or
full-load-and-cdc tasks where CDC position continuity matters.
NEVER evaluate TaskSettings without parsing it first. The DMS API returns
ReplicationTaskSettings as a serialized JSON string. Accessing nested
fields on the raw string produces errors. Always json.loads() first.
NEVER recommend changing SslMode to verify-full without verifying the
source database has TLS enabled and a valid certificate. Switching from
none to verify-full on a database without TLS configured will break the
DMS task connection. Verify the certificate chain first.
NEVER flag a stopped or failed task with a security verdict from its
Status field. Status: stopped is an operational state, not a security
finding. Still audit the configuration — a stopped task with SslMode: none
will replicate in plaintext when restarted.
NEVER modify a running DMS task's endpoints without stopping the task first.
modify-endpoint on an in-use endpoint may cause unpredictable behavior.
Always stop-replication-task before endpoint modifications, then
start-replication-task after.
NEVER recommend deleting a DMS task as remediation without confirming the
migration is complete. Task deletion is irreversible and loses CDC position.
Prefer modifying settings over recreating tasks.
NEVER treat verify-ca and verify-full as equivalent. verify-ca
validates the certificate chain but NOT the hostname — a MITM with a
valid-but-wrong-domain certificate passes. For database migrations, always
recommend verify-full.
NEVER assume EnableLogging: true guarantees CloudWatch Logs are written.
The dms-cloudwatch-logs-role must exist with logs:CreateLogGroup,
logs:CreateLogStream, logs:PutLogEvents — without it, DMS silently
drops logs. Verify the role exists before treating the logging dimension
as remediated.
NEVER ignore the replication instance EngineVersion when auditing CDC
tasks on non-standard engines (MongoDB, DocumentDB, Babelfish). Older
versions silently fail to support CDC for these engines — the task reports
running but no data flows. Verify EngineVersion compatibility.
NEVER overlook pagination when auditing multiple tasks or endpoints.
describe-replication-tasks and describe-endpoints return at most 100
per page. Iterating only the first page silently misses the long tail.
Pre-flight safety checks (run before any remediation CLI)
MANDATORY CONFIRMATION GATE. Before any state-changing operation
(modify-endpoint, modify-replication-task, modify-replication-instance),
emit:
CONFIRM: About to <action> on task/endpoint <id>. This affects <consequence>. Proceed? (yes/no) Do NOT execute until the operator confirms.
Stop-before-modify rule. Before modifying endpoint SSL settings, verify
the task is stopped. If Status: running, emit:
WARN: Task <id> is running. Stop before modifying endpoints: aws dms stop-replication-task --replication-task-arn <arn>
Endpoint certificate verification. Before recommending
SslMode: verify-full, verify the source database has TLS enabled:
aws dms test-connection --replication-instance-arn <instance-arn> --endpoint-arn <endpoint-arn>. If the test fails with a TLS error, the
database certificate must be configured first.
Backup task settings. Before modifying TaskSettings, capture the
current configuration:
aws dms describe-replication-tasks --filters Name=replication-task-id,Values=<id> --output json > /tmp/<id>-backup.json
Task settings changes are not versioned — no undo without a backup.
Remediation guidance
For NO_TLS — endpoint SslMode is none or missing
- Stop the task:
aws dms stop-replication-task --replication-task-arn <arn>.
- Verify the source database supports TLS:
aws dms test-connection --replication-instance-arn <instance> --endpoint-arn <source>.
- Modify the endpoint SSL mode to
verify-full:
aws dms modify-endpoint --endpoint-arn <source-arn> --ssl-mode verify-full.
- If the database lacks a valid TLS certificate, configure one first —
switching to
verify-full without a certificate breaks the connection.
- Restart the task:
aws dms start-replication-task --replication-task-arn <arn> --start-type start-replication.
For NO_LOGGING — EnableLogging is false or absent
- Parse current
TaskSettings from describe-replication-tasks.
- Set
EnableLogging: true and LogLevel: info with LogComponents
including DATA_STRUCTURE, COMMON_AGENT, SOURCE_UNLOAD, TARGET_LOAD:aws dms modify-replication-task --replication-task-arn <arn> \
--replication-task-settings '{"Logging":{"EnableLogging":true,"LogLevel":"info","LogComponents":[{"Id":"DATA_STRUCTURE","Severity":"LOGGER_SEVERITY_ONLY_INFO"},{"Id":"COMMON_AGENT","Severity":"LOGGER_SEVERITY_ONLY_INFO"}]}}'
- Verify the task IAM role has
logs:CreateLogGroup, logs:CreateLogStream,
logs:PutLogEvents — without these, DMS cannot write logs even with
EnableLogging: true.
For CONFIG_GAP — instance, endpoint, or task settings issues
- PubliclyAccessible:
aws dms modify-replication-instance --replication-instance-arn <arn> --publicly-accessible false.
- Multi-AZ:
aws dms modify-replication-instance --replication-instance-arn <arn> --multi-az.
- Endpoint KMS:
aws dms modify-endpoint --endpoint-arn <arn> --kms-key-id <key-arn>.
- Validation:
aws dms modify-replication-task --replication-task-arn <arn> --replication-task-settings '{"ValidationSettings":{"EnableValidation":true,"ValidationMode":"ROW_LEVEL"}}'.
- Deletion protection:
aws dms modify-replication-task --replication-task-arn <arn> --deletion-protection.
For OK
- No remediation required.
- Recommend periodic re-audit after any endpoint or task modification.
- Recommend a CloudWatch alarm on DMS task log filter patterns for
ERROR
and WARNING entries during migration.
Recent AWS features (2024-2026)
- DMS Serverless (2024): DMS now offers a serverless deployment option that auto-scales capacity without pre-provisioning replication instances. Auditors should note that serverless DMS changes the audit surface — there is no replication instance to audit (no public-accessibility, single-AZ, or KMS checks on the instance). Instead, auditors should verify DMS Serverless configuration (max DCUs, VPC settings).
- Enhanced schema conversion (2024-2025): DMS Schema Conversion (formerly SCT) is now integrated into the DMS console. No new audit-surface fields for the replication task itself.
- Replication config (2024): DMS introduced a new
ReplicationConfig API for serverless replications. Auditors should verify that the replication config has appropriate ComputeConfig settings (replication subnet group, VPC security group, KMS key).
Domain
AWS CloudOps / DMS Migration Security & Data Integrity.
AWS documentation
1---2name: dms-replication-task-auditor3description: Audits AWS DMS replication tasks for SSL/TLS gaps on source and target endpoints, missing CDC and task logging, replication instance exposure (public accessibility, single-AZ, missing KMS), endpoint encryption configuration, and task settings integrity (validation, recovery checkpointing, deletion protection). Emits a deterministic verdict (NO_TLS | NO_LOGGING | CONFIG_GAP | OK) per task with enumerated findings and specific CLI remediation. Use when reviewing DMS replication tasks, checking migration endpoint SSL/TLS, validating CDC logging posture, auditing replication instance configuration, or hardening database migration security before production cutover.4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline task/endpoint config classification. Live-account audits use aws dms describe-replication-tasks, describe-endpoints, and describe-replication-instances (AWS CLI v2, SSO or key-based credentials).6metadata:7 source: https://skillmd.com/skills/jhkchan/dms-replication-task-auditor8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '2'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Migration15 verdict_shape: NO_TLS | NO_LOGGING | CONFIG_GAP | OK16 when_to_use: Reviewing a DMS replication task before production cutover, checking endpoint SSL/TLS configuration, validating CDC or task logging posture, auditing replication instance exposure, verifying endpoint encryption, or hardening database migration security.17 activation_triggers: audit this DMS replication task, check DMS endpoint SSL, is my DMS task encrypted, DMS CDC logging, replication instance public, hardening DMS migration, DMS task settings18 invocation_schema: 'Input: either (a) a DMS replication task configuration (task settings + endpoint configs + replication instance metadata), OR (b) a task ARN for live-account audit. Output: deterministic TASK/VERDICT/REASON/FINDINGS/ REMEDIATION block per task, where VERDICT in {NO_TLS, NO_LOGGING, CONFIG_GAP, OK, ERROR}.'19 version: 0.1.020 author: Jacky Chan — AWS Community Builder21 keywords: DMS, Database Migration Service, replication task, SSL/TLS, CDC, change data capture, replication instance, endpoint encryption, task settings, CloudWatch logging, SslMode, verify-full, PubliclyAccessible, migration security, data-in-transit, deletion protection, task validation22 tags: dms, migration, security, ssl-tls, cdc, replication, endpoint, audit23---2425# DMS Replication Task Auditor2627## Mindset2829**One-line takeaway:** the verdict is always the **first** failing dimension30in priority order — and three DMS-specific traps are in a class of their own:31`SslMode: none` (plaintext data pipe), `EnableLogging: false` (silent task32failures), and `PubliclyAccessible: true` (internet-exposed credential store).3334DMS sits between a source and target database — it IS the data pipe for a35migration. Three things make it dangerous when misconfigured:3637- **`SslMode: none` means plaintext replication traffic.** DMS reads every38 row from the source and writes it to the target. Without TLS, every column39 value — credentials, PII, financial records — traverses the network in40 plaintext. This is not an add-on — it is the pipe itself.41- **`EnableLogging: false` makes task failures invisible.** DMS emits42 CloudWatch metrics regardless (CDC latency, throughput), but metrics show43 a healthy task while logs reveal FK constraint failures, data truncation,44 and connection drops. An operator monitoring metrics alone sees green45 while data is silently lost.46- **`PubliclyAccessible: true` exposes the replication instance.** The47 instance stores database credentials for both source and target. A public48 instance is an internet-reachable credential store.4950## Quick reference — verdict thresholds5152| Condition | Verdict | Step |53|---|---|---|54| Any endpoint `SslMode: none` or missing | **NO_TLS** | Step 1 |55| `TaskSettings` logging disabled or absent | **NO_LOGGING** | Step 2 |56| Endpoint `SslMode: require` (no cert verification) | CONFIG_GAP | Step 1 |57| Instance `PubliclyAccessible: true` | CONFIG_GAP | Step 3 |58| Instance `MultiAZ: false` on CDC/full-load-and-cdc task | CONFIG_GAP | Step 3 |59| Endpoint missing `KmsKeyId` | CONFIG_GAP | Step 4 |60| Task missing validation settings | CONFIG_GAP | Step 4 |61| All dimensions pass | **OK** | Step 5 |6263**Verdict priority (first match wins):** NO_TLS > NO_LOGGING > CONFIG_GAP > OK.64All findings are still enumerated regardless of verdict — the verdict65identifies the worst dimension, not the only one.6667## Pre-flight: task metadata gate6869Before evaluating settings, classify the task itself. Several attributes70short-circuit or redirect the audit.7172**Live-account pre-flight (skip for offline config audit):**731. Verify the caller can run `dms:DescribeReplicationTasks` and74 `dms:DescribeEndpoints` — read-only auditor roles should have these.75 Remediation requires `dms:ModifyReplicationInstance` and76 `dms:ModifyEndpoint` — surface this BEFORE the operator approves.772. Confirm `TaskSettings` is a **serialized JSON string** in the API response,78 not a parsed object. Parse with `json.loads()` before evaluating79 `EnableLogging`, `LogLevel`, `ValidationSettings`, etc.803. Snapshot both endpoint configs (`describe-endpoints`) BEFORE any81 modification — endpoint changes are not versioned and there is no undo.824. **Pagination:** `describe-endpoints` and `describe-replication-tasks`83 return at most 100 records per page. Use `--marker` from the prior84 response to page through. Iterating only the first page silently misses85 the long tail of tasks and endpoints.8687| Attribute | Effect on audit |88|---|---|89| `MigrationType: full-load` | Full-load only — CDC position management is N/A. Logging still required. |90| `MigrationType: cdc` | CDC only — CDC position continuity and logging are critical. |91| `MigrationType: full-load-and-cdc` | Both phases — highest risk (CDC inherits all full-load issues). |92| `Status: stopped/failed` | Note as operational risk but still audit config — a stopped task with bad config will fail on restart. |93| Target `EngineName: s3` | S3 target has no `SslMode` — HTTPS is enforced by the SDK. Check SSE in `S3Settings`. Do NOT flag missing SslMode. |9495If the task or endpoint config is malformed (invalid JSON, missing required96fields), output:9798```text99TASK: <task-id>100VERDICT: ERROR101REASON: Task or endpoint configuration is not valid — cannot classify.102REMEDIATION: Re-fetch with aws dms describe-replication-tasks --filters Name=replication-task-id,Values=<id> --output json.103```104105## Process — Classification logic (apply in order, first match wins)106107### Step 0: Expert knowledge — non-obvious DMS behaviors that change classification108109Each of these will produce a wrong verdict if ignored:110111- **Missing `SslMode` defaults to `none`.** The DMS API does not require112 `SslMode` in the endpoint configuration. When absent, DMS connects without113 SSL — plaintext. The console may display this as blank rather than "none",114 making it easy to overlook. Treat a missing `SslMode` identically to115 `SslMode: none`.116117- **`SslMode: require` encrypts but does NOT verify certificates.** The118 connection uses TLS but does not check the server certificate against a119 trusted CA, leaving it vulnerable to man-in-the-middle (MITM) attacks.120 Only `verify-ca` (validates certificate chain) and `verify-full` (validates121 certificate + hostname) provide real TLS security. `require` is a122 CONFIG_GAP — encryption present, certificate trust absent.123124- **`KmsKeyId` on a DMS endpoint encrypts stored config, NOT transit data.**125 The KMS key encrypts the endpoint configuration stored by DMS (including126 connection credentials). It does NOT encrypt data flowing between source127 and target. Data-in-transit is controlled solely by `SslMode`. These are128 independent dimensions — do not conflate a KMS-encrypted endpoint with a129 TLS-encrypted connection.130131- **S3 target endpoints have no `SslMode`.** S3 targets use HTTPS by default132 (enforced by the AWS SDK). Do NOT flag an S3 target for missing `SslMode` —133 it is expected. The source endpoint is still evaluated normally.134135- **DMS CloudWatch metrics are always on; Logs are opt-in.** Even with136 `EnableLogging: false`, DMS emits CloudWatch metrics (CDC latency, task137 throughput, CPU utilization). An operator watching the DMS console sees a138 green task while the logs would reveal foreign-key constraint failures,139 data truncation, and connection drops. Metrics lie; logs tell the truth.140141- **`EnableLogging` is nested inside the `TaskSettings` JSON string.** The142 boolean lives at `TaskSettings.Logging.EnableLogging` (or top-level143 `EnableLogging` in older format). A common audit error is checking the144 task's top-level `Status` field — that reflects running/stopped state, not145 log emission.146147- **Single-AZ replication instances lose CDC position on instance failure.**148 Without Multi-AZ, a replication instance failure requires re-establishing149 CDC from the last checkpoint in the recovery table. If the source has150 rotated binlogs/transaction logs past the checkpoint, CDC cannot resume —151 a full reload is required. Multi-AZ maintains a hot standby with current152 CDC position.153154- **`PubliclyAccessible: true` is the default in some IaC templates.**155 CloudFormation and CDK templates for DMS replication instances may default156 to `PubliclyAccessible: true` when VPC settings are specified without157 explicitly setting it to false. The instance then receives a public IP.158 Always verify this flag — the instance stores database credentials.159160- **`TaskSettings` is a JSON string, not a structured object in the API.**161 `describe-replication-tasks` returns `ReplicationTaskSettings` as a162 serialized JSON string. Treating it as already-parsed leads to attribute163 errors. Always `json.loads()` before evaluating nested settings.164165- **`verify-ca` vs `verify-full` are not interchangeable.** `verify-ca`166 validates the certificate chain but NOT the hostname. `verify-full`167 validates both. A MITM attack with a valid-but-wrong-domain certificate168 passes `verify-ca` but fails `verify-full`. For database migrations, always169 recommend `verify-full`.170171- **`EnableLogging: true` does NOT guarantee logs are written.** DMS requires172 the `dms-cloudwatch-logs-role` service role with `logs:CreateLogGroup`,173 `logs:CreateLogStream`, and `logs:PutLogEvents` to emit CloudWatch Logs. If174 the role is missing or lacks permissions, DMS silently drops logs — the175 task reports running and `EnableLogging: true`, but no log groups appear.176 Always verify the role exists when remediating NO_LOGGING.177178- **`verify-full` requires the CA certificate bundle on the instance.** When179 using `SslMode: verify-full` with a self-signed or private-CA database180 certificate, the CA bundle must be imported into the replication instance181 (`--certificate-arn` on the endpoint). Without it, the task enters `STOPPED`182 with a generic connection error that masquerades as a TLS issue.183184- **Cross-account endpoint access requires BOTH network and IAM paths.** When185 the source or target database is in a different AWS account, the replication186 instance needs VPC peering or Transit Gateway connectivity AND the database187 security group must allow inbound from the instance's subnet CIDR. A common188 misconfiguration is correct routing but a security group blocking the DMS189 instance — the task fails with a connection timeout that looks like a TLS190 error.191192- **`EngineVersion` gates feature support.** DMS replication instance193 `EngineVersion` determines supported features. Versions before 3.4.x do not194 support CDC for MongoDB/DocumentDB; versions before 3.1.x lack Babelfish195 target support. An unsupported engine/version combination produces silent196 CDC lag — the task reports running but no data flows. Verify EngineVersion197 compatibility when auditing CDC tasks on non-standard engines.198199- **DMS task IAM role over-privilege is a hidden blast radius.** The IAM role200 assumed by DMS for endpoint access often accumulates broad permissions201 (`dms:*` or `rds-db:*` on `*`). While this does not change the task202 verdict, it widens the credential blast radius if the replication instance203 is compromised. Flag the task IAM role for least-privilege review alongside204 the task config audit.205206### Step 1: TLS / SSL evaluation (highest priority — plaintext data pipe)207208For each endpoint (source and target, except S3 targets), evaluate `SslMode`:209210| SslMode | Classification | Reason |211|---|---|---|212| `none` | **NO_TLS** | Plaintext — all data flows unencrypted between source and target. |213| missing | **NO_TLS** | Defaults to `none` — treated identically to explicit plaintext. |214| `require` | CONFIG_GAP (additive) | TLS present but no certificate verification — MITM possible. |215| `verify-ca` | OK for TLS dimension | Certificate chain validated. |216| `verify-full` | OK for TLS dimension | Certificate + hostname validated — strongest TLS posture. |217218**Priority rule:** if ANY endpoint (source or target) has `SslMode: none` or219missing, the task verdict is **NO_TLS** — do not continue to Step 2 unless220enumerating additional findings. The data pipe is plaintext regardless of how221well-configured the other endpoint is.222223**S3 target exception:** S3 target endpoints (`EngineName: s3`) do not have224`SslMode` — HTTPS is enforced by the AWS SDK. Do NOT classify the target as225NO_TLS for missing SslMode. The source endpoint is still evaluated.226227**Self-managed source on EC2:** If the source is a self-managed database on228EC2, `SslMode: none` means traffic flows over the VPC network. For cross-VPC229or cross-account migrations, this traffic traverses peering or Transit230Gateway — still unencrypted. Flag as NO_TLS regardless of network topology.231232### Step 2: Logging evaluation (second priority — silent failures)233234Parse `TaskSettings` (JSON string to object) and evaluate the logging235configuration:236237| Condition | Classification | Reason |238|---|---|---|239| `EnableLogging: false` | **NO_LOGGING** | No CloudWatch Logs — task failures invisible. |240| `EnableLogging` absent from TaskSettings | **NO_LOGGING** | Same as false — DMS does not enable logging by default. |241| `EnableLogging: true` + `LogLevel: default` | CONFIG_GAP (additive) | Minimal output. Upgrade to `info` or `warning` for audit trail. |242| `EnableLogging: true` + `LogLevel: info/warning` + `LogComponents` populated | OK | Sufficient for audit trail. |243244**The metrics-vs-logs trap:** DMS emits CloudWatch metrics regardless of245`EnableLogging`. An operator monitoring `CDCLatencySource` or246`FullLoadThroughputBandwidth` sees normal values while logs would reveal data247loss. `EnableLogging: false` is a silent failure amplifier — the task looks248healthy while data integrity degrades.249250### Step 3: Replication instance configuration251252Evaluate the replication instance backing the task:253254| Condition | Classification | Reason |255|---|---|---|256| `PubliclyAccessible: true` | CONFIG_GAP (additive) | Instance has public IP — internet-reachable credential store. |257| `MultiAZ: false` on `cdc` or `full-load-and-cdc` task | CONFIG_GAP (additive) | No hot standby — CDC position lost on failure requires full reload. |258| `MultiAZ: false` on `full-load`-only task | OK for this dimension | Full-load restarts from scratch — Multi-AZ beneficial but not critical. |259| `KmsKeyId` absent on instance | CONFIG_GAP (additive) | Instance storage unencrypted. |260| `ReplicationInstanceClass: dms.t2.*` / `dms.t3.micro` on CDC task | CONFIG_GAP (additive) | Burstable — CPU credits deplete under sustained CDC, causing latency spikes. |261262**Multi-AZ nuance:** In DMS, the Multi-AZ standby maintains CDC replication263position but does NOT serve as an active replica. On failover, DMS264automatically promotes the standby — no operator intervention needed. Without265Multi-AZ, the task enters `STOPPED` state on instance failure and requires266manual restart with potential CDC position loss.267268### Step 4: Endpoint encryption and task settings integrity269270Evaluate endpoint-level encryption and task-level integrity controls:271272| Condition | Classification | Reason |273|---|---|---|274| Endpoint `KmsKeyId` absent | CONFIG_GAP (additive) | Endpoint config (including credentials) stored unencrypted by DMS. |275| `ValidationSettings.EnableValidation: false` or absent | CONFIG_GAP (additive) | No automated data-integrity check — row mismatches undetected. |276| `RecoveryTable` absent on CDC task | CONFIG_GAP (additive) | CDC checkpoint in memory only — lost on reboot, requires full reload. |277| `DeletionProtection: false` or absent | CONFIG_GAP (additive) | Task can be deleted via CLI — loses CDC position and migration state. |278279**Validation importance:** DMS task validation compares source and target row280counts and (optionally) data contents after migration. Without it, you have no281automated mechanism to detect silent data loss — a row that fails to replicate282due to a constraint violation appears normal in metrics.283284### Step 5: Aggregation — first failing dimension wins (priority order)285286```text287if any finding == NO_TLS: verdict = NO_TLS288elif any finding == NO_LOGGING: verdict = NO_LOGGING289elif any finding == CONFIG_GAP: verdict = CONFIG_GAP290else: verdict = OK291```292293All findings are enumerated in the output regardless of verdict. A task with294NO_TLS may also have logging and config findings — the operator needs the295full picture, not just the worst dimension.296297## Output format (per task)298299```text300TASK: <replication-task-id or ARN>301VERDICT: NO_TLS | NO_LOGGING | CONFIG_GAP | OK302REASON: <1-2 sentences citing the worst finding and step number>303FINDINGS:304 - [NO_TLS] <finding description (Step N)>305 - [CONFIG_GAP] <finding description (Step N)>306 - [OK] <dimension that passed>307REMEDIATION: <specific action per finding, or "None required" if OK>308```309310### Worked example — NO_TLS with compounding findings311312```text313TASK: arn:aws:dms:us-east-1:111111111111:task:prod-migration-task314VERDICT: NO_TLS315REASON: Source endpoint (MySQL) has SslMode none — all replicated data flows316in plaintext between source and target (Step 1). Logging is enabled but task317validation is absent, compounding the risk.318FINDINGS:319 - [NO_TLS] Source endpoint SslMode is none — plaintext data in transit (Step 1)320 - [CONFIG_GAP] ValidationSettings.EnableValidation absent — no data-integrity check (Step 4)321 - [OK] Target endpoint SslMode is verify-full (Step 1)322 - [OK] EnableLogging is true with LogLevel info (Step 2)323REMEDIATION:324 1. NO_TLS — Modify source endpoint SslMode to verify-full:325 aws dms modify-endpoint --endpoint-arn <source-arn> --ssl-mode verify-full.326 2. CONFIG_GAP — Enable task validation:327 aws dms modify-replication-task --replication-task-arn <task-arn>328 --replication-task-settings '{"ValidationSettings":{"EnableValidation":true}}'.329```330331## Anti-Patterns — NEVER332333- NEVER classify an endpoint with `SslMode: require` as NO_TLS. The connection334 IS encrypted — it just lacks certificate verification. `require` is a335 CONFIG_GAP. Conflating encryption-present with encryption-absent produces336 alert fatigue.337338- NEVER flag an S3 target endpoint (`EngineName: s3`) for missing `SslMode`.339 S3 targets use HTTPS by default (AWS SDK enforced). The `SslMode` field is340 not applicable. Flagging it is a false positive.341342- NEVER treat `KmsKeyId` on a DMS endpoint as equivalent to data-in-transit343 encryption. The KMS key encrypts the endpoint configuration stored by DMS344 (credentials, connection string), NOT data flowing between databases.345 Only `SslMode` controls transit encryption.346347- NEVER assume a DMS task is healthy because CloudWatch metrics show normal348 values. Metrics are always emitted regardless of `EnableLogging`. The349 metrics-vs-logs trap means `CDCLatencySource` can look fine while logs350 reveal data loss. Always check `EnableLogging`, not metrics.351352- NEVER overlook `PubliclyAccessible: true` on a replication instance. The353 instance stores database credentials for both source and target. A public354 instance is an internet-reachable credential store.355356- NEVER classify `MultiAZ: false` as a finding on a `full-load`-only task.357 Full-load tasks restart from the beginning on failure — Multi-AZ is358 beneficial but not critical. Only flag Multi-AZ absence on `cdc` or359 `full-load-and-cdc` tasks where CDC position continuity matters.360361- NEVER evaluate `TaskSettings` without parsing it first. The DMS API returns362 `ReplicationTaskSettings` as a serialized JSON string. Accessing nested363 fields on the raw string produces errors. Always `json.loads()` first.364365- NEVER recommend changing `SslMode` to `verify-full` without verifying the366 source database has TLS enabled and a valid certificate. Switching from367 `none` to `verify-full` on a database without TLS configured will break the368 DMS task connection. Verify the certificate chain first.369370- NEVER flag a stopped or failed task with a security verdict from its371 `Status` field. `Status: stopped` is an operational state, not a security372 finding. Still audit the configuration — a stopped task with `SslMode: none`373 will replicate in plaintext when restarted.374375- NEVER modify a running DMS task's endpoints without stopping the task first.376 `modify-endpoint` on an in-use endpoint may cause unpredictable behavior.377 Always `stop-replication-task` before endpoint modifications, then378 `start-replication-task` after.379380- NEVER recommend deleting a DMS task as remediation without confirming the381 migration is complete. Task deletion is irreversible and loses CDC position.382 Prefer modifying settings over recreating tasks.383384- NEVER treat `verify-ca` and `verify-full` as equivalent. `verify-ca`385 validates the certificate chain but NOT the hostname — a MITM with a386 valid-but-wrong-domain certificate passes. For database migrations, always387 recommend `verify-full`.388389- NEVER assume `EnableLogging: true` guarantees CloudWatch Logs are written.390 The `dms-cloudwatch-logs-role` must exist with `logs:CreateLogGroup`,391 `logs:CreateLogStream`, `logs:PutLogEvents` — without it, DMS silently392 drops logs. Verify the role exists before treating the logging dimension393 as remediated.394395- NEVER ignore the replication instance `EngineVersion` when auditing CDC396 tasks on non-standard engines (MongoDB, DocumentDB, Babelfish). Older397 versions silently fail to support CDC for these engines — the task reports398 running but no data flows. Verify EngineVersion compatibility.399400- NEVER overlook pagination when auditing multiple tasks or endpoints.401 `describe-replication-tasks` and `describe-endpoints` return at most 100402 per page. Iterating only the first page silently misses the long tail.403404## Pre-flight safety checks (run before any remediation CLI)405406- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation407 (modify-endpoint, modify-replication-task, modify-replication-instance),408 emit:409 `CONFIRM: About to <action> on task/endpoint <id>. This affects410 <consequence>. Proceed? (yes/no)` Do NOT execute until the operator confirms.411412- **Stop-before-modify rule.** Before modifying endpoint SSL settings, verify413 the task is stopped. If `Status: running`, emit:414 `WARN: Task <id> is running. Stop before modifying endpoints:415 aws dms stop-replication-task --replication-task-arn <arn>`416417- **Endpoint certificate verification.** Before recommending418 `SslMode: verify-full`, verify the source database has TLS enabled:419 `aws dms test-connection --replication-instance-arn <instance-arn>420 --endpoint-arn <endpoint-arn>`. If the test fails with a TLS error, the421 database certificate must be configured first.422423- **Backup task settings.** Before modifying `TaskSettings`, capture the424 current configuration:425 `aws dms describe-replication-tasks --filters Name=replication-task-id,Values=<id> --output json > /tmp/<id>-backup.json`426 Task settings changes are not versioned — no undo without a backup.427428## Remediation guidance429430### For NO_TLS — endpoint SslMode is none or missing4314321. Stop the task: `aws dms stop-replication-task --replication-task-arn <arn>`.4332. Verify the source database supports TLS:434 `aws dms test-connection --replication-instance-arn <instance> --endpoint-arn <source>`.4353. Modify the endpoint SSL mode to `verify-full`:436 `aws dms modify-endpoint --endpoint-arn <source-arn> --ssl-mode verify-full`.4374. If the database lacks a valid TLS certificate, configure one first —438 switching to `verify-full` without a certificate breaks the connection.4395. Restart the task:440 `aws dms start-replication-task --replication-task-arn <arn> --start-type start-replication`.441442### For NO_LOGGING — EnableLogging is false or absent4434441. Parse current `TaskSettings` from `describe-replication-tasks`.4452. Set `EnableLogging: true` and `LogLevel: info` with `LogComponents`446 including `DATA_STRUCTURE`, `COMMON_AGENT`, `SOURCE_UNLOAD`, `TARGET_LOAD`:447 ```bash448 aws dms modify-replication-task --replication-task-arn <arn> \449 --replication-task-settings '{"Logging":{"EnableLogging":true,"LogLevel":"info","LogComponents":[{"Id":"DATA_STRUCTURE","Severity":"LOGGER_SEVERITY_ONLY_INFO"},{"Id":"COMMON_AGENT","Severity":"LOGGER_SEVERITY_ONLY_INFO"}]}}'450 ```4513. Verify the task IAM role has `logs:CreateLogGroup`, `logs:CreateLogStream`,452 `logs:PutLogEvents` — without these, DMS cannot write logs even with453 `EnableLogging: true`.454455### For CONFIG_GAP — instance, endpoint, or task settings issues4564571. **PubliclyAccessible:**458 `aws dms modify-replication-instance --replication-instance-arn <arn> --publicly-accessible false`.4592. **Multi-AZ:**460 `aws dms modify-replication-instance --replication-instance-arn <arn> --multi-az`.4613. **Endpoint KMS:**462 `aws dms modify-endpoint --endpoint-arn <arn> --kms-key-id <key-arn>`.4634. **Validation:**464 `aws dms modify-replication-task --replication-task-arn <arn> --replication-task-settings '{"ValidationSettings":{"EnableValidation":true,"ValidationMode":"ROW_LEVEL"}}'`.4655. **Deletion protection:**466 `aws dms modify-replication-task --replication-task-arn <arn> --deletion-protection`.467468### For OK4694701. No remediation required.4712. Recommend periodic re-audit after any endpoint or task modification.4723. Recommend a CloudWatch alarm on DMS task log filter patterns for `ERROR`473 and `WARNING` entries during migration.474475## Recent AWS features (2024-2026)476477- **DMS Serverless (2024):** DMS now offers a serverless deployment option that auto-scales capacity without pre-provisioning replication instances. Auditors should note that serverless DMS changes the audit surface — there is no replication instance to audit (no public-accessibility, single-AZ, or KMS checks on the instance). Instead, auditors should verify DMS Serverless configuration (max DCUs, VPC settings).478- **Enhanced schema conversion (2024-2025):** DMS Schema Conversion (formerly SCT) is now integrated into the DMS console. No new audit-surface fields for the replication task itself.479- **Replication config (2024):** DMS introduced a new `ReplicationConfig` API for serverless replications. Auditors should verify that the replication config has appropriate `ComputeConfig` settings (replication subnet group, VPC security group, KMS key).480481## Domain482483AWS CloudOps / DMS Migration Security & Data Integrity.484485## AWS documentation486487- **AWS Database Migration Service User Guide** — https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html488- **DMS Security** — https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html489- **DMS API Reference** — https://docs.aws.amazon.com/dms/latest/APIReference/490- **DMS CLI Reference** — https://docs.aws.amazon.com/cli/latest/reference/dms/491- **DMS Serverless** — https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Serverless.html