All Products
Search
Document Center

Function Compute:Manage aliases

Last Updated:Mar 31, 2026

Each time you deploy a new service version without an alias, you must manually update every trigger that references it — directly exposing clients to version changes. An alias is a pointer to a specific service version in Function Compute (FC). By pointing triggers to an alias instead of a version, you can publish, roll back, and run canary releases without touching client-side configuration.

How aliases work

Each alias points to a major version — the primary destination for all traffic. Optionally, you can split a portion of traffic to a canary release version to validate a new release before fully promoting it.

When you use an alias to access a service or functions, Function Compute resolves the alias to a concrete service version and runs the corresponding functions. The caller never needs to know which version ran.

Example: rolling from Version 1 to Version 2

Initially, the alias PROD points to Version 1:

image

When Version 2 is ready, update PROD to point to Version 2. Traffic shifts immediately, and the client configuration stays unchanged:

image

To roll back, point PROD back to Version 1.

Prerequisites

Before you begin, ensure that you have:

Create an alias

  1. Log on to the Function Compute console. In the left-side navigation pane, click Services & Functions.

  2. In the top navigation bar, select a region. On the Services page, click the target service.

  3. In the left-side navigation pane, click Aliases. On the Aliases page, click Create Alias.

  4. In the Create Alias for Service panel, configure the parameters described below, then click OK.

The alias appears on the Aliases page after creation. To view logs, click Logstore in the Actions column — this opens the Simple Log Service (SLS) console.

Deleting an alias removes only the alias itself. The version it pointed to and any triggers pointing to the alias are retained.

Alias parameters

ParameterDescription
NameName of the alias.
DescriptionOptional description.
Major VersionThe primary version that receives all traffic (or the remaining traffic when canary release is enabled).
Enable Canary ReleaseSelect Yes to split traffic between the major version and a canary release version.

Canary release parameters

These parameters appear when Enable Canary Release is set to Yes.

ParameterDescription
Canary Release VersionThe version that receives canary traffic.
Canary Release TypeHow traffic is split: Random (weight-based) or By Rules (header, cookie, or query matching).
Canary Release Version WeightRequired when Canary Release Type is Random. Sets the percentage of traffic sent to the canary release version. For example, 5% sends 5% to the canary version and 95% to the major version.
Rule ModeRequired when Canary Release Type is By Rules. Meet All routes to the canary only when all rules match; Meet Any routes when at least one rule matches.
RulesRequired when Canary Release Type is By Rules. Each rule specifies a Parameter Type (Header, Cookie, or Query), a Parameter name, a Condition, and a Value. Click + Add Rule to add multiple rules.
By Rules takes effect only when you use an HTTP trigger to call an alias.

Rule conditions

ConditionBehavior
=, !=, >, <, >=, <=Routes to the canary version when the request parameter satisfies the comparison.
IncludeRoutes to the canary version when the request parameter value is contained in the specified Value.
Value DistributionRoutes a percentage of requests to the canary version based on the distribution of the parameter's values. For example, set Parameter Type to Header, Parameter to user-id, and Value to 20 to route 20% of requests to the canary version based on the user-id header values.

Advanced settings

ParameterDescription
Canary Release Weight of Provisioned InstancesControls the proportion of provisioned instances that handle canary traffic. The default is 1%. This setting only applies when the number of provisioned instances is greater than 1.

What's next

Manage aliases using the CLI with Serverless Devs commands.