AWS DMS replication instances are evaluated for public exposure. Exposure is identified when PubliclyAccessible is enabled and an attached security group allows inbound traffic from any address. Private or allowlisted instances are not considered exposed.
Risk
Publicly reachable replication instances threaten:
- Confidentiality: migration data and credentials can be intercepted or exfiltrated.
- Integrity: attackers may alter tasks or inject records.
- Availability: abuse or DDoS can stall replication and delay cutovers.
Run this check with Prowler CLI
prowler aws --checks dms_instance_no_public_access
Recommendation
Adopt a private-only design:
- Disable
PubliclyAccessible; place instances in private subnets. - Enforce least privilege security groups (no
0.0.0.0/0); allow only required sources/ports. - Provide access via VPN, peering, or Direct Connect.
- Layer controls (ACLs, monitoring) and restrict IAM to necessary actions.
Remediation
Native IaC
Terraform
Other
- In the AWS Console, open Database Migration Service > Replication instances and select the instance
- In Details > Networking, click each attached Security Group ID to open it in the EC2 console
- In Inbound rules, delete any rule with Source 0.0.0.0/0 or ::/0
- Save rules for each security group
Source Code
Resource Type
AwsDmsReplicationInstance
References
- https://docs.aws.amazon.com/securityhub/latest/userguide/dms-controls.html#dms-1
- https://docs.aws.amazon.com/amazonq/detector-library/terraform/restrict-public-access-dms-terraform/
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/DMS/publicly-accessible.html
- https://support.icompaas.com/support/solutions/articles/62000233448-ensure-dms-instances-are-not-publicly-accessible