DMS replication instances should not be public

Description

This control evaluates the PubliclyAccessible field to confirm that AWS DMS replication instances are not publicly accessible.

Private replication instances, which use private IP addresses, are inaccessible from outside the network. When source and target databases share the same network, ensure the instance is private and connected to its VPC via AWS Direct Connect, VPC peering, or VPN.

Remediation

The public access setting for a DMS instance cannot be changed after creation. To disable public access, delete the instance and create a new one, leaving the Publicly accessible option off.