Help Center/ FunctionGraph/ User Guide/ Managing Functions/ Importing and Exporting Functions
Updated on 2025-08-19 GMT+08:00

Importing and Exporting Functions

FunctionGraph supports function import and export. You can export a function as a file to your local PC and import it to the FunctionGraph console of another region or user to migrate function configuration data.

Notes and Constraints

Table 1 Restrictions on function import and export

Item

Description

Restrictions on function export

  • The exported function resource package cannot exceed 50 MB.
  • The exported function resource package does not include alias information.
  • Only functions of the latest version can be exported from the function list.
  • Encrypted environment variables can be exported.

Restrictions on function import

  • When a function is imported across regions (for example, from CN East-Shanghai1 to CN North-Beijing4), the encryption environment variable of the function may fail to be decrypted because the keys may be different in different regions. In this case, you need to reconfigure the encryption environment variables.
  • If the code to be uploaded contains sensitive information (such as account passwords), encrypt the sensitive information to prevent leakage.
  • The maximum file size is 10 MB.
  • The uploaded file is a ZIP package that contains the function code (ZIP) and function configuration file (YAML).

Exporting a Function

  1. Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. On the Functions page, you can export functions using either of the following methods:
    • Exporting functions in batches: Select the functions to be exported from the function list and click Export Function. The exported functions are downloaded as a ZIP file.
      Only the latest version of each function can be exported.
      Figure 1 Exporting functions in batches

    • Exporting a single function:
      1. Click the name of the desired function.
      2. On the function details page, select the version of the function to be exported.
      3. In the upper right corner of the function details page, click Export Function.
        Figure 2 Exporting a function

Importing a Function

  1. Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. Click Import Function. In the displayed dialog box, click Add and select the exported ZIP function file.
    Figure 3 Importing a function

  3. The system automatically reads and configures the runtime of the function. Edit the function name and click OK.

Helpful Links

Import and export functions using APIs. For details, see Function Import and Export APIs.