All Products
Search
Document Center

Function Compute:How do I access private VPC resources in a function?

Last Updated:Aug 20, 2025

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.

Note

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.