Description
DMS connects a replication instance to a source and a target. publiclyAccessible controls the instance’s IP address. Endpoint network rules control connectivity, and IAM controls who can manage DMS. If you omit the property, check the provider behavior and deployed state.
Potential impact
A public IP with a route from an external network and security groups that allow the traffic can expose the instance to unwanted connections. Losing a route to either endpoint interrupts replication.
Remediation
- When a private address is sufficient, set
publiclyAccessible: false. Provide VPC, peering, VPN or Direct Connect routes as needed, including an outbound path for any internet destination. Limit security groups and endpoint allow-lists to the required sources and ports. - Check
pulumi previewfor the instance replacement and changes to dependent resources. If the instances will coexist, use different identifiers. Plan for downtime, task movement, resumption and recovery. Test both endpoints, replication and data consistency before removing the old resources.
Examples
Supply the subnet group, endpoints, IAM permissions and a real security group in place of sg-12345678. Choose an engine version and instance class supported in the Region for the workload.
Before
name: aws-dms
runtime: yaml
description: amazon dms replication instance
resources:
test:
type: aws:dms:ReplicationInstance
properties:
allocatedStorage: 20
multiAz: false
publiclyAccessible: true
replicationInstanceClass: dms.t3.micro
replicationInstanceId: test-dms-replication-instance-tf
vpcSecurityGroupIds:
- sg-12345678
After
name: aws-dms
runtime: yaml
description: amazon dms replication instance
resources:
test:
type: aws:dms:ReplicationInstance
properties:
allocatedStorage: 20
multiAz: false
publiclyAccessible: false
replicationInstanceClass: dms.t3.micro
replicationInstanceId: test-dms-replication-instance-tf
vpcSecurityGroupIds:
- sg-12345678
Explanation:
- Before: The instance requests a public IP. Access to database contents and credentials is controlled separately.
- After: Only the public-address flag changes. The new instance still needs routes to both endpoints.