AWS Lambda Canary Deploy
Publish a new Lambda function version and create a weighted alias to begin routing canary traffic alongside the stable version.
The AWS Lambda Canary Deploy step publishes a new version of your Lambda function and creates or updates a weighted alias to begin splitting traffic between the previous version and the new one. Use it as the first step in a canary stage, followed by one or more Traffic Shift steps to gradually increase traffic to the new version.
Before you begin
A Lambda service with an
AwsLambdaFunctionDefinitionmanifest and an artifact source. Whether you also need anAwsLambdaFunctionAliasDefinitionmanifest depends on your artifact type:ZIP artifact (S3, Artifactory, Nexus): Alias definition is required. The step reads the alias manifest to determine the alias name and fails without one.
ECR container image: Alias definition is not required. The step manages the alias automatically.
Go to Lambda services.
A Lambda infrastructure with an AWS connector and region. Go to Lambda infrastructure.
Step YAML
- name: AWS Lambda Canary Deploy
id: awsLambdaCanaryDeployStep
template:
uses: awsLambdaCanaryDeployStepThe step uses no explicit with: inputs — service configuration and infrastructure are resolved automatically from the stage context at runtime.
Configure the step
When you add the step to a canary stage, the following sections appear. All values are derived automatically from your service and infrastructure configuration.
Service Configuration
Function Definition
${{serviceOutput.manifests.awsLambdaFunction.paths}}
Path to the function definition manifest resolved from the service. Defines the function name, handler, runtime, memory, and timeout.
Function Alias
${{serviceOutput.manifests.awsLambdaAlias.paths}}
Path to the alias definition manifest. Populated when your service includes an AwsLambdaFunctionAliasDefinition manifest. Required for ZIP artifact canary; empty and unused for ECR image canary.
Infrastructure Configuration
AWS Connector
${{infra.connectorRef}}
The AWS connector resolved from the infrastructure definition. Used to authenticate to Lambda and publish the new version.
AWS Region
${{infra.region}}
The AWS region resolved from the infrastructure definition.
Step outputs
The following output variables are available for use in downstream Traffic Shift steps.
functionName
<+stage.steps.awsLambdaCanaryDeployStep.output.outputVariables.functionName>
The name of the Lambda function that was deployed. Auto-populates the function_name input on Traffic Shift steps.
version
<+stage.steps.awsLambdaCanaryDeployStep.output.outputVariables.version>
The published version number of the new function. Auto-populates the function_version input on Traffic Shift steps.
Advanced settings
Timeout duration: Maximum time the step is allowed to run before being terminated.
On failure: Define what happens if the step fails — retry, mark as success, or abort.
Strategy: Configure a looping strategy to run this step over a list of values.
Conditional execution: Run this step only when a specified condition is true.
Next steps
Go to AWS Lambda Traffic Shift to configure the step that routes traffic to the new version.
Go to Lambda canary deployment for the full canary flow walkthrough.
Last updated
Was this helpful?