AWS::Lambda::Alias VersionWeight - AWS CloudFormation
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.

AWS::Lambda::Alias VersionWeight

The traffic-shifting configuration of a Lambda function alias.

Syntax

To declare this entity in your CloudFormation template, use the following syntax:

JSON

{ "FunctionVersion" : String, "FunctionWeight" : Number }

YAML

FunctionVersion: String FunctionWeight: Number

Properties

FunctionVersion

The qualifier of the second version.

Required: Yes

Type: String

Update requires: No interruption

FunctionWeight

The percentage of traffic that the alias routes to the second version.

Required: Yes

Type: Number

Update requires: No interruption

Examples

Routing Configuration

An alias that routes half of incoming requests to a second version.

YAML

alias: Type: AWS::Lambda::Alias Properties: FunctionName: !Ref function FunctionVersion: !GetAtt newVersion.Version Name: BLUE RoutingConfig: AdditionalVersionWeights: - FunctionVersion: !GetAtt version.Version FunctionWeight: 0.5