For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 AwsLambdaFunctionDefinition manifest and an artifact source. Whether you also need an AwsLambdaFunctionAliasDefinition manifest 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.

  • A Lambda infrastructure with an AWS connector and region. Go to Lambda infrastructure.


Step YAML

- name: AWS Lambda Canary Deploy
  id: awsLambdaCanaryDeployStep
  template:
    uses: awsLambdaCanaryDeployStep

The 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

Field
Value
Description

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

Field
Value
Description

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.

ECR image functions

When your artifact is a container image from ECR, the function definition uses packageType: Image — there is no handler or runtime field. Define functionName and role as service variables. The Function Alias field will be empty; this is expected and the canary deploy step handles alias management automatically.

When your artifact is a ZIP file, define functionName and runtime as service variables and add an alias definition manifest so the step can create the named alias.


Step outputs

The following output variables are available for use in downstream Traffic Shift steps.

Output variable
Expression
Description

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

Last updated

Was this helpful?