Updated on 2025-08-19 GMT+08:00

Versions

FunctionGraph allows you to publish one or more versions throughout the development, test, and production processes to manage your function code. Each version is a complete snapshot of the function at a specific point in time, corresponding to a tag in the code. It includes independent code, configuration, and dependency, making it convenient for rollback, parallel deployment, or feature validation.

After a function is created, the default version is latest. Each function has the latest version.

After a function version is published, you can modify the version configuration as required. However, the code of the version cannot be updated to ensure version stability and traceability.

Notes and Constraints

  • You can release a maximum of 20 versions (including the latest version) for a function.
  • No triggers, mounting disks, or reserved instances are configured in a new version by default.
  • The latest version of a function cannot be deleted.
  • If a function version associated with aliases is deleted, the aliases will also be deleted.
  • Deleting a version will permanently delete the associated code, configuration, alias, and event source mapping, but will not delete logs. Deleted versions cannot be recovered. Exercise caution when performing this operation.

Publishing a Version

  1. Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. Click the name of a function.
  3. On the Versions tab, click Publish New Version. The new version is published as the latest version.
    Figure 1 Parameters for publishing a new version
    Table 1 Version configuration parameters

    Parameter

    Description

    Version

    Enter a version number.

    The value can contain a maximum of 42 characters, including letters, digits, hyphens (-), underscores (_), and periods (.). It must start and end with a letter or digit. If no version number is specified, the system automatically generates a version number based on the current date, for example, v20220510-190658.

    Description

    Description of the version. The value can contain a maximum of 512 characters.

  4. Click OK. The system automatically publishes a version. Then you will be redirected to the new version.

Deleting a Function Version

  1. On the function details page, select the latest version.
  2. On the Versions tab page, you can view the created version list.
  3. Click Delete on the right of the version. In the displayed dialog box, enter DELETE and click OK.
    Figure 2 Deleting a Version

  4. Click OK to delete the version.

Helpful Links

Manage function versions using APIs. For details, see Function Version and Alias APIs.