Managing Cloud Functions via Console
Cloud Functions are one of the core features of the cloud development platform. Effective management of Cloud Functions can enhance application performance, reliability, and security. This document will guide you on managing the lifecycle of Cloud Functions through the console.
Management Method
You can manage Cloud Functions in the following two ways:
- Console Management: Use the Cloud Development Platform Cloud Functions Management Page to perform visual operations.
- Command-line Management: Use the CloudBase CLI tool to perform command-line operations.
This document primarily focuses on the console management approach. For CLI management, please refer to Managing Cloud Functions via CLI.
Creating Cloud Functions
Create via Console
- Log in to the Cloud Development Platform and go to the Cloud Functions Management Page
- Click the "New Cloud Function" button
- Fill in the function name, runtime environment, function description, and other information.
- Select a function template or write code from scratch
- Click "OK" to complete the creation

Development and Deployment
Online Editing and Deployment
You can directly edit Cloud Function code in the Cloud Development Console:
- On the Cloud Functions Management Page, choose the target function
- Modify the code in the code editor
- Click "Save and Install Dependencies" to complete the deployment

Deploying by Uploading Code Packages
For more complex projects, you can package and upload the code:
- Package the function code and dependencies into a ZIP file
- On the Cloud Function details page, select "Upload ZIP Package"
- Select the local ZIP file and upload it
- Click "Save and Install Dependencies" to complete the deployment
The root directory of the ZIP package should contain the entry file, such as index.js in a Node.js environment.
Function Configuration
On the Cloud Functions Management Page, choose the target function, click the "Configuration" tab, and you can adjust the following configuration items:
Basic Configuration
| Configuration Item | Description | Default Value | Allowed Values |
|---|---|---|---|
| Memory Configuration | The maximum memory limit for the Cloud Function runtime | 256MB | 128MB - 2048MB |
| Timeout | Maximum function execution time; function will be forcibly terminated upon timeout | 20s | 1s - 900s |
| Environment Variables | Environment variables defined in key/value pairs | None | Custom |
Memory configuration affects function performance and billing. Set it appropriately based on actual requirements.
Network Configuration
Public Network Access
Cloud Functions have public network access enabled by default. You can disable it based on security requirements. Once disabled, the function will be unable to access public network resources.
Private Network Access (VPC Configuration)
You can configure Cloud Functions to access the VPC private network:
- No VPC configured: Function instances run in an isolated network environment and have access to the public network
- VPC configured: Function instances run in the specified VPC network and can access resources within the VPC
- If public network access is required after configuring VPC, please ensure that the VPC network has configured Public Network Gateway or NAT Gateway
- For more information on VPC network configuration, please refer to VPC Private Network Overview
- For a detailed description of Cloud Functions network configuration, please refer to Network Configuration Details
Fixed Egress IP
After enabling this feature, Cloud Functions will be assigned a fixed public network egress IP, which will be shared with other functions in the same namespace that have this feature enabled.
The fixed egress IP feature can take effect only when public network access is enabled for Cloud Functions.
Rate Limiting Configuration
Cloud Functions supports configuring access rate limiting to help you control function invocation frequency, preventing malicious calls and resource abuse:
- Rate Limiting Rules: You can set the maximum number of invocations per second, per minute, or per hour.
- Rate Limiting Policy: Supports rate limiting control based on dimensions such as IP and User ID.
- Overlimit Handling: When the invocation frequency exceeds the limit, the system returns a corresponding error message.
Properly configuring rate limiting rules can effectively protect your Cloud Functions from malicious attacks while controlling costs. For detailed configuration methods, refer to the Rate Limiting Feature Configuration Guide.
Provisioned Concurrency Configuration
Provisioned Concurrency is an advanced feature of Cloud Functions that pre-launches a specified number of function instances to effectively resolve cold start issues:
Features
- Eliminates cold start: Pre-provisioned instances remain in a running state at all times, enabling immediate request processing upon arrival.
- Performance improvement: Eliminates instance startup time and significantly improves response speed.
- Cost optimization: Billing based on the running time of provisioned instances, suitable for high-frequency access scenarios
Configuration Method
- On the Cloud Function details page, choose the "Provisioned Concurrency" tab
- Set the number of provisioned concurrency instances
- Configure the version or alias for provisioned concurrency
- Click "Save" to complete the configuration
- Provisioned Concurrency is suitable for scenarios with stable traffic volume and high requirements for response time.
- Provisioned instances incur continuous charges; please configure the quantity reasonably based on actual business needs.
Function Monitoring
View Runtime Logs
On the Cloud Function details page, choose the "Logs" tab:
- Set the time range and log level:
- View function execution logs and error messages
- Supports real-time log viewing and historical log search
Monitoring Metrics
On the Cloud Function details page's "Monitoring" tab, you can view the following key metrics:
- Invocations
- Error Count
- Average Execution Time
- Memory Usage
Delete Cloud Function
Delete via the console
- On the Cloud Functions Management Page, locate the target function
- Click "More" → "Delete"
- Enter the function name in the confirmation dialog to confirm deletion
Deleting cloud functions cannot be undone. The function will become inaccessible after deletion. Please proceed with caution.
Using CLI to Manage
If you need to use the command-line tool for automated deployment and batch management, please refer to the CLI Management of Cloud Functions documentation.
Frequently Asked Questions
What to Do If Cloud Function Deployment Fails?
- Check the code for syntax errors
- Verify that the dependencies are compatible with the cloud function environment
- View the deployment logs and locate the specific cause of the error
- Try to reduce the deployment package size, as cloud functions have size limits for deployment packages
How to Resolve Cloud Function Execution Timeout
- Increase the function timeout setting
- Optimize code execution efficiency
- For long-running tasks, consider splitting them into multiple functions or using asynchronous execution
How to Handle Cloud Function Cold Start Issues
- Keep function code concise and reduce unnecessary dependencies
- Use provisioned concurrency instances
- Periodically warm up functions to keep them active
How to Access a Database from Cloud Functions
Cloud functions can directly access the CloudBase database via the SDK without additional authentication configuration. Sample code:
const tcb = require('@cloudbase/node-sdk');
const app = tcb.init();
const db = app.database();
exports.main = async (event, context) => {
const collection = db.collection('users');
const result = await collection.get();
return result;
};
For more Cloud Functions related questions, please refer to Cloud Functions FAQ.