- Newest
- Most votes
- Most comments
Based on the very shot input, I guess you like to know if VPC peering is supported for AWS DMS. ... YES, VPC peering is supported for AWS DMS !
This configuration is commonly used when your replication instance and your source or target databases reside in different VPCs.
To ensure a successful connection, you must verify the following requirements:
- Active Peering Connection: The VPC peering connection must be in the Active state before DMS can route traffic through it.
- No Overlapping CIDR Blocks: The VPCs must have non-overlapping IP address ranges (CIDR blocks). If they overlap, the peering connection cannot be established.
- Route Table Updates: Use the Resource map tab in the Amazon VPC console to identify which route tables require updates. You must add a route that directs traffic for the peer VPC CIDR to the peering connection ID (
pcx-123). - DNS Resolution Support: If your DMS endpoints use hostnames (e.g., RDS endpoints) instead of IP addresses, you must enable DNS resolution support in the VPC peering connection settings.
- Security Best Practices: Restrict Security Group rules to allow traffic only on the necessary ports (e.g., 3306 for MySQL, 5432 for PostgreSQL) and only from the specific CIDR or Security Group of the DMS replication instance.
Note: For detailed step-by-step instructions, refer to the VPC peering connections section in the AWS DMS User Guide: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Advanced.Endpoints.vpc.peering.html
To configure VPC peering for AWS Database Migration Service (DMS), you must establish a private network connection that allows your replication instance to communicate with your source or target databases. This is common when resources reside in different VPCs or different AWS accounts.
1. Standard VPC Peering (Same Account)
If your replication instance and database are in the same account but different VPCs:
-
Create Peering Connection: In the VPC Console, create a peering connection between the DMS VPC (Requester) and the database VPC (Accepter).
-
Update Route Tables: In both VPCs, add a route to the subnet route tables. The Destination should be the CIDR block of the peer VPC, and the Target should be the Peering Connection ID (
pcx-abcd). -
Configure Security Groups:
-
Database SG: Allow inbound traffic on the database port (e.g., 5432 for Postgres) from the DMS replication instance's private IP or its VPC CIDR.
-
DMS SG: Ensure outbound rules allow traffic to the database's private IP and port.
-
Enable DNS Resolution: If you use hostnames (like RDS endpoints), you must edit DNS settings on the peering connection to allow the requester/accepter VPC to resolve the other's DNS hostnames to private IPs.
2. Cross-Account VPC Peering
When the DMS instance is in Account A and the database is in Account B, the process requires cross-account acceptance:
- Request (Account A): Create the peering request using the Account ID and VPC ID of Account B.
- Accept (Account B): Log into Account B's VPC console, find the pending request, and choose Accept Request.
- Routing & DNS: Perform the same route table updates and DNS resolution steps mentioned above in both accounts.
- Security Group Referencing: Note that you cannot reference security groups by ID across accounts unless both VPCs are in the same region. If they are in different regions, you must use CIDR blocks in your security group rules.
Key Requirements & Constraints
- No Overlapping CIDRs: The VPCs must not have overlapping IP address ranges, or the peering connection will fail.
- Active Status: DMS can only route traffic once the peering connection is in the
Activestate. - Public vs. Private: If your DMS instance is "Private," it must use peering, VPN, or Direct Connect to reach endpoints outside its own VPC. If it is "Public," it can reach endpoints via the internet, but peering is preferred for security and lower latency.
For detailed architecture and step-by-step console instructions, refer to the AWS DMS User Guide on VPC Peering.
Relevant content
- asked 6 years ago
- asked 3 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 4 years ago

If my answer helped solve your problem, I would appreciate it if you click on “accepted answer”