All Products
Document Center


Last Updated: Jun 05, 2019

Alibaba Cloud Function Compute allows its users to create and update their services so that they can improve their products over time. In many cases, a user needs to revert back the recent changes in a service or simply wants to keep track of the history of the improvements. We now provide first-class support for our users to manage their code in Function Compute using the version and alias feature.

Introducing Version

Function Compute provides service level versioning for our user. A version is an immutable snapshot of a service, including the service configuration, its functions’ code and configuration. Function Compute allows you to publish one or more versions of your service. Every time a user publishes a version, the Function Compute takes a snapshot from the LATEST service and generates a unique version name associated with it. As a result, you can work with different variations of your code by specifiying which version to invoke or deploy. In addtion, you can use “Version” combined with “Alias” to handle most of the software development life cycle scenarios and facilitate the continuous integration process.

Introducing Alias

Conceptually, an alias is a pointer to specific service versions and can be changed. An alias can only point to service versions, not another alias. Function compute allows you to create one or many aliases in a service. You can specify an alias when you invoke a function. Function Compute will, in turn, invoke the function that belongs to the verisions of the service that this alias points to. As a result, you can now maintain different service variations such as development, beta, and production.

Use cases


You can now configure your service traffic patterns by simply changing the versions to which your clients point.

You can now separate your development code base from your prooduction code base. For example, in the absence of versioning, every change you make will immediately affect the production environment, it is not possible to separate the code that’s in production versus what’s in development. With versioning, you can publish a new version to serve the online request, and continue to develop on the LATEST version.

You can now promote your new version, roll back, and do dark launching by just updating the corresponding Aliases. For example, without alias, each time you publish a new version, you need to update the trigger, and the third party needs to change their request to invoke the correct version. Suppose you have your HTTP trigger pointing to alias Prod, and Prod pointing to some version. You only need to update the alias Prod to promote the new version to production, the third party doesn’t have to change anything. The same applies when you need to roll back to a previous version.

For more detailed information, please refer to following topics: