All Products
Search
Document Center

ApsaraDB RDS:How do I connect an ECS instance and an ApsaraDB RDS instance over an internal network if these instances reside in networks of different types?

Last Updated:Jun 20, 2025

An Elastic Compute Service (ECS) instance and an ApsaraDB RDS instance can communicate over an internal network only when the instances reside in the networks of the same type. You can change the network types of the instances to the same network type or use a Cloud Enterprise Network (CEN) instance to connect the instances over an internal network.

Check network types

  1. Make sure that the ECS instance and the RDS instance both reside in VPCs or in the classic network.

    • View the network type of the ECS instance.

    • View the network type of the RDS instance.

  2. If one instance resides in the classic network and the other instance resides in a VPC, use one of the following methods to resolve the issue:

  3. If the ECS instance and the RDS instance both reside in VPCs, make sure that the instances reside in the same VPC.

    • View the ID of the VPC in which the ECS instance resides.

    • View the network type of the RDS instance.

  4. If the ECS instance and the RDS instance reside in different VPCs, use one of the following methods to resolve the issue:

  5. If the ECS instance and the RDS instance reside in the same VPC and the same region, the ECS instance can connect to the RDS instance by using the public endpoint rather than the internal endpoint of the RDS instance, and both the ping and telnet commands return connection failures, you can resolve the issue based on the descriptions in What do I do if an ECS instance cannot connect to an ApsaraDB RDS instance due to routing problems?