Function Compute allows functions to access specific virtual private clouds (VPCs). You can grant Function Compute the liyunECSNetworkInterfaceManagementAccess permission to operate elastic network interfaces (ENIs) for a service to which your function belongs, and provide VPC configuration information, including the VPC ID, vSwitch ID, and security group ID. After VPC configurations are enabled, your functions can access resources in a specific VPC.
For more information about how to configure role permissions for a service, see Grant Function Compute permissions to access other Alibaba Cloud services.
For more information about how to configure a VPC for a service, see Configure network settings.
We recommend that you configure a vSwitch in which the number of IP addresses is greater than the maximum number of instances that you may use to avoid container creation failures caused by insufficient IP addresses.