• Product Introduction
  • Quick Start
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
    • Start with AI
  • Framework Guide
    • Frontends
      • Vite
      • React
      • Vue
      • Hugo
      • Other Frameworks
    • Backends
    • Full-stack
      • Next.js
      • Nuxt
      • Astro
      • React Router
      • SvelteKit
      • TanStack Start
      • Vike
    • Custom 404 Page
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Building Output Configuration
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Using Github Actions
    • Using Gitlab CI/CD
    • Using CNB Plugin
    • Using IDE PlugIn
    • Using CodeBuddy IDE
  • Domain Management
    • Overview
    • Custom Domain
    • HTTPS Configuration
      • Overview
      • Apply for Free Certificate
      • Using Managed SSL Certificate
    • Configure DNS CNAME Record
  • Observability
    • Overview
    • Metric Analysis
    • Log Analysis
  • Pages Functions
    • Overview
    • Edge Functions
    • Cloud Functions
      • Overview
      • Node.js
      • Python
      • Go
  • Middleware
  • KV Storage
  • Edge AI
  • API Token
  • EdgeOne CLI
  • Copilot
    • Overview
    • Quick Start
  • Pages MCP
  • Pages Skills
  • Message Notification
  • Integration Guide
    • AI
      • Dialogue Large Models Integration
      • Large Models for Images Integration
    • Database
      • Supabase Integration
      • Pages KV Integration
    • Ecommerce
      • Shopify Integration
      • WooCommerce Integration
    • Payment
      • Stripe Integration
      • Integrating Paddle
    • CMS
      • WordPress Integration
      • Contentful Integration
      • Sanity Integration
      • Payload Integration
    • Authentication
      • Supabase Integration
      • Clerk Integration
  • Best Practices
    • AI Dialogue Deployment: Deploy Project with One Sentence Using Skill
    • Using General Large Model to Quickly Build AI Application
    • Use the DeepSeek model to quickly build a conversational AI site
    • Building an Ecommerce Platform with Shopify
    • Building a SaaS Site Using Supabase and Stripe
    • Building a Company Brand Site Quickly
    • How to Quickly Build a Blog Site
  • Migration Guides
    • Migrating from Vercel to EdgeOne Pages
    • Migrating from Cloudflare Pages to EdgeOne Pages
    • Migrating from Netlify to EdgeOne Pages
  • Troubleshooting
  • FAQs
  • Contact Us
  • Release Notes

Overview

Introduction

Cloud Functions is a cloud function service provided by Pages Functions, suitable for complex backend scenarios such as accessing external services, operating the database, and handling compute-intensive tasks.


Supported runtime

Cloud Functions supports various mainstream programming languages and runtime environments. You can select the appropriate runtime based on your business needs.

Node.js

Supports JavaScript or TypeScript development. You can access the complete npm ecosystem directly and leverage the mature Node.js toolchain to build applications.

Python

Supports development using Python and integrates third-party libraries via pip. Offers native support for mainstream Web frameworks such as Flask, FastAPI, Django, and Sanic.

Go

Leverage the excellent concurrency capability and execution performance of Golang to build high-performance backend services, and support project dependency management through Go Modules.
Note:
For detailed configuration, built-in APIs, and usage examples of each runtime, see the corresponding Node.js, Python, or Go detailed documentation.


Multi-Region Deployment

Cloud Functions supports deployment in multiple regions. You can choose the region for function execution and deploy functions closer to the data source, thereby reducing network latency and improving response speed.
Note:
Multi-region deployment is applicable only to Cloud Functions.

Region Selection

The region configuration of Cloud Functions is related to the Acceleration Region of the project:
Global availability zone (including Chinese mainland): You can configure regions in Chinese mainland and regions outside Chinese mainland separately.
Chinese mainland availability zone: Only require configuration for Chinese mainland.
Global availability zone (excluding Chinese mainland): Only require configuration for regions outside Chinese mainland.
By default, the Chinese mainland region is ap-guangzhou (Guangzhou), and regions outside the Chinese mainland are ap-singapore (Singapore).

Optional Region List

Chinese mainland:
Region name
Region ID
Guangzhou
ap-guangzhou
Shanghai
ap-shanghai
Nanjing
ap-nanjing
Beijing
ap-beijing
Chengdu
ap-chengdu
Regions outside Chinese mainland:
Region name
Region ID
Singapore
ap-singapore
Hong Kong (China)
ap-hongkong
Bangkok
ap-bangkok
Jakarta
ap-jakarta
Seoul
ap-seoul
Tokyo
ap-tokyo
Frankfurt
eu-frankfurt
Virginia
na-ashburn
Silicon Valley
na-siliconvalley

Configuration Method

Configure in the console

In the Pages console project setting, select the deployment region in function management.

Configure in edgeone.json

In the edgeone.json file, specify the function deployment region through the mainlandRegions and overseasRegions fields, and configure as needed based on the acceleration region of the project.
{
"mainlandRegions": ["ap-beijing"],
"overseasRegions": ["ap-tokyo"]
}
Note:
Each field in the array can only be configured with one region.
edgeone.json: The region configuration priority in edgeone.json is higher than the console configuration.


Use Limits

The following are the general restrictions and runtime version info for Cloud Functions:
Content
Limitation
Note
Code package size
128 MB
Single function code package size (including dependencies) supports up to 128 MB.
Request body size
6 MB
Client requests carry a body with a maximum of 6 MB.
maximum execution time
120s
Maximum Duration from the start of a single request to the response.
Node.js version
v20.x
Default Node.js runtime version
Python version
3.10
The server runtime environment is Python 3.10. We recommend using the same version for local development.
Go version
1.26
Runtime environment version 1.26 (backward compatibility)
Note:
When involved in file transfer, it is not recommended to store data that needs long-term retention. We recommend using Tencent Cloud COS to handle persistence needs.

ai-agent
You can ask me like
How to Get Started with EdgeOne Pages?