For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/terraform-aws-amazon-dms-replication-instance-is-publicly-accessible.md.
A documentation index is available at /llms.txt.
Amazon DMS Replication Instances with publicly_accessible set to true expose their endpoints to the public internet, significantly increasing the attack surface and potential for unauthorized access to sensitive migration data. This configuration can lead to data breaches, as DMS instances may contain credentials, connection strings, and other sensitive information needed for database migration. To mitigate this risk, always set publicly_accessible to false (or omit it since false is the default) and use private networking with proper security groups as shown in the negative example: resource "aws_dms_replication_instance" "test" { ... } where the publicly_accessible attribute is not specified.