VPC sharing allows sharing VPC resources created in one account with other accounts using Resource Access Manager (RAM). For example, account A can share its VPC and subnets with account B. After accepting the share, account B can view the shared VPC and subnets and use them to create resources.
An enterprise IT management account creates a VPC and subnets and shares them with other service accounts to facilitate centralized configuration of VPC security policies and orderly resource management.
Service accounts use the shared VPC and subnets to create resources and want to use DLI to submit jobs and access resources in the shared VPC. To do this, they need to establish a network connection between DLI and the resources in the shared VPC.
For example, account A is the enterprise IT management account and the owner of VPC resources. It creates the VPC and subnets and shares them with service account B.
Account B is a service account that uses the shared VPC and subnets to create resources and uses DLI to access them.
Account A, as the resource owner, has created a VPC and subnets and designated account B as the principal.
Set parameters based on Table 1.
Parameter |
Description |
---|---|
Connection Name |
Name of the datasource connection to be created |
Resource Pool |
You do not need to set this parameter in this scenario. |
VPC |
VPC shared by account A to account B |
Subnet |
Subnet shared by account A to account B |
Host Information |
You do not need to set this parameter in this scenario. |
Tags |
Tags used to identify cloud resources. A tag includes the tag key and tag value. |
If there is no elastic resource pool available, create one by referring to Creating an Elastic Resource Pool.
If there are resources in the shared VPC, ensure that the security group the resources belong to has allowed access to the elastic resource pool's CIDR block.
Take the RDS data source as an example. On the Instances page, click the target DB instance. On the displayed page, locate the Connection Information pane and view the private IP address. In the Connection Information pane, locate the Database Port to view the port number of the RDS DB instance.
If the address is reachable, it means that account B has established a network connection between the DLI resource and the resources in the shared VPC. Account B can then submit jobs to the elastic resource pool's queue and access the resources in the shared VPC.