By default, Function Compute uses elastic instances, which are automatically scaled based on the number of requests. When there are no requests, instances are automatically destroyed to ensure you only pay for what you use. If you see unexpected charges, the cause may be functions configured with reserved mode. Follow this guide to find and delete unused function resources and configurations to prevent further charges.
Process overview
Check your
reserved modeconfigurations.Log on to the Elasticity Policies page of the Function Compute console to review the
reserved modeconfigurations for your functions and determine if they are still needed.Delete different types of function resources.
ImportantDeleted functions cannot be recovered. Please proceed with caution. If you confirm that you will no longer use Function Compute, you can perform the delete operation after backing up your data and migrating your business.
Confirm the Function Compute version
Log on to the Function Compute console. The console version is 3.0 if Function Compute FC 3.0 is displayed in the upper-left corner. If you are on the Function Compute 2.0 console, click Experience Function Compute 3.0 in the upper-right corner to switch.
Delete functions in Function AI console projects
Log on to the Function Compute console. In the left-side navigation pane, click Function AI. On the Function AI page, click Projects in the navigation bar.
In the project list, find the target project and click Delete in the Actions column. In the confirmation dialog, review the resources to be deleted, enter the project name, select the checkbox, and then click Confirm Delete.
In the project list, click the target project, and then click the Monitoring tab to confirm whether the function has any invocation count. If there is an invocation count, it indicates that the function is in use. Proceed with caution.
Delete functions in Function Compute 3.0 applications
Log on to the Function Compute console. In the left-side navigation pane, click Applications.
On the Applications page, find the target application and click Delete in the Actions column.
In the dialog box that appears, select I understand the risks of resource deletion and want to delete the selected resources., and then click Delete Applications and Resources.
Delete functions
Log on to the Function Compute console. On the Overview page, view the number of functions in different regions in the Region Data Statistics area.
(Optional) To back up your code before deletion, go to the Function page from the left-side navigation pane. Select a region, click the target function, and go to the Code tab. You can export the code. Later, you can upload this backup to restore the function.
Click Export Function in the upper-right corner and select Export Function Code from the drop-down menu.
Click Upload Code in the upper-right corner. From the drop-down menu, you can select Upload ZIP Package, Upload Folder, or Upload from OSS.
In the Actions column of the target function, choose . In the dialog box that appears, select I confirm that I want to delete the above resources and this function. I understand that these resources cannot be retrieved after deletion., and then confirm the deletion.
The dialog box lists the associated resources and their quantities to be deleted, including triggers, aliases, versions, reserved instance policies, concurrency limit, asynchronous configurations, and the current function.
Delete resources linked to functions
In Function AI projects and Function Compute applications, sometimes NAS is created for storage. Resources stored in the NAS file system will continue to be charged. For more information, see Delete NAS file system.
In addition to NAS, Function Compute may use other cloud services that continue to incur charges until deleted. After you delete these resources, charges stop from the next billing cycle.
OSS bucket: If your function uses an OSS bucket to store trigger data, logs, or intermediate files, the corresponding bucket will continue to incur storage and request fees. If it is no longer needed, log on to the OSS console to delete the bucket. Before deletion, you must remove all objects in the bucket, including fragments. For details, see Delete a bucket.
VPC and vSwitch: If your function is configured to access a VPC, the VPC and vSwitch themselves are free of charge. However, resources within the VPC, such as an Elastic IP Address (EIP), will continue to incur charges. If the VPC is no longer needed, release all resources within it before deleting it.
NAT Gateway: If your function is configured with a NAT Gateway to access the public internet, the NAT Gateway will continue to incur instance and data processing fees. If you no longer need the NAT Gateway, delete it to stop these charges.
Custom domain: A custom domain itself is free, but an associated HTTPS certificate purchased from the SSL Certificates Service may incur fees. If you no longer need to access the function via the custom domain, log on to the Function Compute console, click Domains in the left-side navigation pane, find the target domain, and delete it.
More questions
My function has no requests, why are the charges still increasing?
Does the resource plan support auto-renewal? If yes, can I disable auto-renewal?