ExitAWS CodeDeploy: Lambda version traffic shifting1 / 9
Explanation

Deploy the alias, not mutable code

How CodeDeploy shifts a Lambda alias between published versions using deployment configurations, validation hooks, and alarm-based rollback. · advanced

A Lambda deployment shifts an alias between already published versions. In this example, callers invoke live, initially pointing to version 41. Version 42 is published before deployment; CodeDeploy changes alias routing rather than rewriting either version. Calls made directly to a version bypass that routing.

The AppSpec identifies the function, alias, current version, target version, and optional hooks. The deployment configuration supplies the traffic schedule; the deployment group supplies alarm and automatic rollback settings. The diagram separates deployment control from application execution.

CodeDeploy executes this rollout; CodePipeline orchestrates release stages, and Lambda executes application and hook code. CloudWatch evaluates metric alarms; CloudTrail records API activity, while X-Ray records traces. Neither API history nor traces replace the alarm status CodeDeploy monitors.

alias updateshook invocationtest invocationsvalidation statusexecution metricsalarm status
AWS CodeDeployLambda deployment
AWS LambdaApplication function: live alias, published versions 41 and 42
AWS LambdaValidation hook functions
Amazon CloudWatchApplication metrics and deployment alarms

1 / 7 CodeDeploy owns the Lambda deployment and applies its selected rollout policy.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.