All Products
Search
Document Center

DataWorks:Connect to a cross-region data source in the same account

Last Updated:Mar 09, 2026

This topic uses an ApsaraDB RDS for MySQL instance as an example to explain how to connect a DataWorks workspace to a data source in a different region within the same Alibaba Cloud account.

Use cases

Use this solution if your data source and DataWorks workspace meet all the following conditions:

  • The data source is an Alibaba Cloud product.

  • The data source and the DataWorks workspace belong to the same Alibaba Cloud account.

  • The data source and the DataWorks workspace are in different regions.

Solution overview

In a scenario where the data source and workspace are in the same account but different regions, you can use a VPC (private network) connection. You can use a network connectivity tool, such as CEN or a VPC peering connection, to connect the VPC of the DataWorks resource group to the VPC of the data source. This enables network communication.

Network architecture diagram

幻灯片3

Prerequisites

Billing

Charges vary depending on the networking product you choose. For more information, see the billing details for Cloud Enterprise Network (CEN) or Peering Connection.

Configure network connectivity

Note

The following steps outline the general process of connecting your data source to DataWorks and explain the core networking logic. For detailed, step-by-step instructions, see the configuration example in this topic.

Step 1: Obtain basic information

For the data source

  • Region: This example uses an ApsaraDB RDS for MySQL instance in the China (Hangzhou) region.

  • VPC and vSwitch information:

    Note

    To find VPC information for other Alibaba Cloud services, see the official documentation for the specific service.

    1. Go to the ApsaraDB RDS console, locate the target Instance, and click its Instance Name to access the Basic Information page.

    2. In the left-side navigation pane, click Database Connection to view the VPC and vSwitch information for the ApsaraDB RDS for MySQL instance.

      image

For DataWorks

  • Region: This example uses a DataWorks workspace and resource group in the China (Shanghai) region.

  • VPC and vSwitch information for the resource group:

    1. Go to the DataWorks resource group list page, find the target resource group, and click Network Settings in the Actions column.

    2. View the bound VPC and vSwitch information in the appropriate module.

      For example, to synchronize data, find this information under Data Scheduling & Data Integration.

      image

Step 2: Establish the network connection

To connect VPCs across different regions, use a networking product. Choose one of the following options based on your needs:

Note

If you encounter issues while establishing the network connection, submit a ticket to contact technical support for the relevant cloud product.

Step 3: Add a route to the resource group

To access a cross-region data source, add a route in the DataWorks resource group that points to the vSwitch CIDR block of the data source.

  1. Go to the DataWorks Resource Group list page, find the target resource group, and click Network Settings in the Actions column.

  2. In the relevant feature module, find the bound VPC and click Custom Route in the Actions column.

  3. Click Add Route. For the connection method, select CIDR block. Set Destination CIDR block to the CIDR block of the data source's vSwitch.

Step 4: (Optional) Configure the whitelist

If your data source uses a whitelist for access control, add the CIDR block of the resource group's vSwitch to the data source's whitelist to grant access.

For example, to Configure an IP Whitelist for an ApsaraDB RDS for MySQL Instance, add the vSwitch CIDR block of the DataWorks resource group to the Whitelist and SecGroup settings.

Note

For other Alibaba Cloud services, see their official documentation for instructions on whitelist configuration.

image

Verify network connectivity

  1. Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Integration > Data Integration. On the page that appears, select the desired workspace from the drop-down list and click Go to Data Integration.

  2. In the left-side navigation pane, click Data Source. On the Data Sources page, click Add Data Source. Select the appropriate data source type and configure the connection parameters.

  3. In the resource group list at the bottom, select the resource group connected to the data source and click Test Network Connectivity.image

    Note

    If the connectivity test fails, you can use the Network Connectivity Diagnosis Tool to troubleshoot the issue. If you still cannot connect the resource group to the data source, submit a ticket for assistance.

Configuration example

This example shows how to connect an ApsaraDB RDS for MySQL instance in China (Hangzhou) to a DataWorks workspace in China (Shanghai) within the same Alibaba Cloud account.

1. Basic information

Parameter

Data source (RDS for MySQL)

DataWorks resource group

Account

Same account

Region

China (Hangzhou)

China (Shanghai)

VPC

  • VPC Name: vpc-hangzhou

  • VPC CIDR block: 192.168.0.0/16

  • vSwitch Name: hz-h

  • vSwitch CIDR block: 192.168.6.0/24

image

  • VPC Name: vpc-shanghai

  • VPC CIDR block: 172.16.0.0/16

  • vSwitch Name: sh-l

  • vSwitch CIDR block: 172.16.0.0/24

image

2. Establish the network connection

This solution supports using Cloud Enterprise Network (CEN) and Peering Connection to connect your data source to DataWorks. You can choose either method.

Note

If you encounter issues while establishing the network connection, submit a ticket to contact technical support for the relevant cloud product.

Connect with CEN

  1. Go to the Cloud Enterprise Network console and click Create CEN Instance.

  2. In the Create CEN Instance dialog box, switch to the Create Scenario-specific CEN (Recommended) tab. Select the VPC Interconnection scenario and click Create.

    Note

    The VPC Interconnection scenario is suitable for connecting VPCs within the same account, regardless of the region.

  3. In the Configure Networking Settings step, configure the network information for the data source and the DataWorks resource group.

    • In the first tab, configure the network information for the data source:image

      • Region: China (Hangzhou)

      • VPC:

        • VPC: Select the VPC where the data source is located. For this example, select vpc-hangzhou.

        • vSwitch: Select the vSwitch where the data source is located. For this example, select hz-h.

          Note

          For high availability, CEN requires you to attach vSwitches from at least two different availability zones. Make sure you select the vSwitch where your data source resides. Then, select another vSwitch in a different availability zone. If you do not have one, click Create VSwitch in the drop-down list to create a new one.

    • Click + to add a new tab and configure the network information for the DataWorks resource group:

      image

      • Region: China (Shanghai)

      • VPC:

        • VPC: Select the VPC where the DataWorks resource group is located. For this example, select vpc-shanghai.

        • vSwitch: Select the vSwitch where the resource group is located. For this example, select sh-l.

          Note

          For high availability, CEN requires you to attach vSwitches from at least two different availability zones. Make sure you select the vSwitch where your resource group resides. Then, select another vSwitch in a different availability zone. If you do not have one, click Create vSwitch in the drop-down list to create a new one.

  4. Click Next. CEN automatically generates the Networking Settings and Billing Details. After reviewing them, click Start Deployment.

  5. Wait for the deployment to complete.

    Important

    Do not close the page before the deployment is complete.

Connect with a peering connection

  1. Go to the Peering Connection console. At the top of the page, switch the region to China (Hangzhou), and then click Create Peering Connection. Configure the parameters.

    The following table describes the key parameters for this example. You can keep the default values for any parameters not mentioned.

    Parameter

    Configuration and example

    Peering Connection Name

    Enter a custom name. This example uses connect-hangzhou-shanghai-vpc.

    Requester VPC

    Select the VPC where the ApsaraDB RDS for MySQL Data Source is located. This example uses vpc-hangzhou.

    Accepter Account Type

    This example uses Same account.

    Accepter Region Type

    This example uses Cross-region.

    Accepter Region

    Select the region where the DataWorks workspace and Resource Group are located. This example uses China (Shanghai).

    Accepter VPC

    Select the VPC where the DataWorks Resource Group is located. This example uses vpc-shanghai.

  2. Click OK to complete the peering connection configuration.

  3. In the Peering Connection console, find the Peering Connection you created. Click Configure Route under both the Requester VPC and Accepter VPC columns.image

    • For the requester VPC's route (pointing to the Accepter): Enter a Name, and set Destination CIDR block to the Accepter's vSwitch CIDR block. This example uses 172.16.0.0/24.

    • For the Accepter VPC's route (pointing to the Requester): Enter a Name, and set Destination CIDR block to the Requester's vSwitch CIDR block. This example uses 192.168.6.0/24.

3. Add a route to the resource group

  1. Go to the DataWorks Resource Group list page, find the target resource group, and click Network Settings in the Actions column.

  2. In the relevant feature module, find the bound VPC and click Custom Route in the Actions column.

  3. Click Add Route. For the connection method, select CIDR block. Set Destination CIDR block to the vSwitch CIDR block of the ApsaraDB RDS for MySQL instance, which is 192.168.6.0/24 in this example.

4. Configure the whitelist

In the Whitelist and SecGroup settings for the ApsaraDB RDS for MySQL instance, add the vSwitch CIDR block of the DataWorks resource group. In this example, the CIDR block is 172.16.0.0/24.

image

5. Test the connectivity

  1. Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Integration > Data Integration. On the page that appears, select the desired workspace from the drop-down list and click Go to Data Integration.

  2. In the left-side navigation pane, click Data Source to go to the Data Sources page, and then click Add Data Source.

  3. Select the MySQL data source type and configure the connection information.

    • For Configuration Mode, select Alibaba Cloud Instance Mode.

    • For Region, select China (Hangzhou).

    • For Instance, select the ApsaraDB RDS for MySQL instance in China (Hangzhou) that you previously connected.

  4. In the Connection Configuration section, click Test Network Connectivity for the bound resource group. A Connected status indicates a successful connection.

    image

    Note

    If the connectivity test fails, you can use the Network Connectivity Diagnosis Tool to troubleshoot the issue. If you still cannot connect the resource group to the data source, submit a ticket for assistance.

Related documents

For frequently asked questions about network connectivity, see Resource group operations and network connections.