All Products
Document Center


Last Updated: Dec 08, 2018

In this example, you can learn how to use Function Compute version management from console, and what is the best way to use version management. Please read version management if you want to know more.

Follow these steps to use version management:

It assumes that you have signed up for Alibaba Function Compute. If not, following Quick Start to sign up.

Create service and function

1 . Create a service named versioning_demo.createdemoservicePlease see operations in Function Compute for more configuration options. The initial version “LATEST” generated by default after service creation.serviceinfo

2 . Create function named echo_version_info

As shown above, click on “Operation”, select “Create Function” from the drop-down menu, copy the following nodejs code into the online editor, and click “OK”.

  1. module.exports.handler = function(eventBuf, context, callback) {
  2. var qualifier = context['service']['qualifier']
  3. var versionId = context['service']['versionId']
  4. console.log('Qualifier from context:', qualifier);
  5. console.log('VersionId from context: ', versionId);
  6. callback(null, qualifier);
  7. };


So far you have created a service that contains a function, and the “LATEST” version.

Next:Using LATEST version