A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.alibabacloud.com/help/en/functioncompute/fc-2-0/user-guide/configure-network-settings below:

Configure network settings for functions in a service - Function Compute

By default, you can invoke the functions that you create in Function Compute only over the Internet. If you want your functions to access resources in a virtual private cloud (VPC) or allow requests from a specific VPC to the functions, you must manually configure the network and permissions for the service to which the functions belong. The network settings take effect at the service level and apply to all functions in the service. This topic describes how to configure networks for a service in the Function Compute console.

Usage notes Network access capabilities

The VPC feature reduces the cold start efficiency of Function Compute. We recommend that you do not configure this feature unless necessary. You can use RAM users to access resources, such as Tablestore.

Traffic is generated when you access a function from a network address or when a function access a network address. The following types of traffic are generated:

You can configure network settings based on your business requirements to obtain corresponding network access capabilities of functions:

Zones where Function Compute is supported

Expand to view zones where Function Compute is supported

Region name

Region ID

Supported zones

China (Hangzhou)

cn-hangzhou

China (Shanghai)

cn-shanghai

China (Qingdao)

cn-qingdao

cn-qingdao-c

China (Beijing)

cn-beijing

China (Zhangjiakou)

cn-zhangjiakou

China (Hohhot)

cn-huhehaote

China (Shenzhen)

cn-shenzhen

China (Chengdu)

cn-chengdu

China (Hong Kong)

cn-hongkong

Singapore

ap-southeast-1

Malaysia (Kuala Lumpur)

ap-southeast-3

ap-southeast-3a

Indonesia (Jakarta)

ap-southeast-5

Japan (Tokyo)

ap-northeast-1

UK (London)

eu-west-1

eu-west-1a

Germany (Frankfurt)

eu-central-1

US (Silicon Valley)

us-west-1

US (Virginia)

us-east-1

For more information about the latest supported zones in each region, you can call the GetAccountSettings operation in OpenAPI Explorer.

If your resources are deployed in a zone where Function Compute is not supported, create a vSwitch in a supported zone in your VPC and specify the vSwitch ID in the VPC configurations of a Function Compute service. vSwitches in the same VPC can communicate with each other over private networks. Therefore, Function Compute can use the vSwitch to access VPC resources that are deployed in other zones. For more information, see How can I resolve the "vSwitch is in unsupported zone" error?

Before you start Configure network settings and role

VPCs and permissions are configured at the service level. If you allow a service in Function Compute to access a VPC, all functions in the service are allowed to access the VPC.

  1. Log on to the Function Compute console. In the left-side navigation pane, click Services & Functions.

  2. In the top navigation bar, select a region. On the Services page, find the desired service and click Configure in the Actions column.

  3. In the Role Settings section of the Modify Service page, configure the Service Role parameter. Make sure that the role you select has permissions to access VPC resources

    We recommend that you grant permissions to the role based on the principle of least privilege. For more information about fine-grained permission control, see Policies and sample policies.

  4. In the Network Settings section, configure the following parameters.

  5. Click Save.

FAQ Troubleshooting

Function Compute does not verify permissions to access a VPC if you configure vpcConfig. Instead, permissions are verified when a function is executed. Therefore, new errors may occur when you invoke the function by using the InvokeFunction operation if vpcConfig is configured. The following table describes common errors that may occur when a function in Function Compute accesses a VPC. You can refer to this table to troubleshoot issues.

Error code

Status code

Cause

Solution

InvalidArgument

400

Function Compute does not support the zone of the specified vSwitch.

Specify a valid vSwitch ID. For more information, see Zones where Function Compute is supported.

The resources specified by the vpcId, vSwitchIds, or securityGroupId parameter in vpcConfig cannot be found.

Check whether the settings in vpcConfig are valid.

The specified vSwitch or security group is not in the VPC.

Check whether settings of vpcConfig are valid. Make sure that the resources specified by vSwitchId and securityGroupId are deployed in the VPC that is specified by vpcId.

AccessDenied

403

You have not granted operation permissions on elastic network interfaces(ENI) to the function.

Check the operation permissions of the service. For more information, see Grant Function Compute permissions to access other Alibaba Cloud services.

ResourceExhausted

429

The available IP addresses in the CIDR block of the vSwitch are insufficient. Function Compute cannot create more ENIs.

Create a vSwitch with a larger CIDR block and update the vSwitchId parameter in vpcConfig.

Note

We recommend that you use the /24 or /16 CIDR block.

Additional information

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4