Lambda versions and aliases provide a mechanism for managing and deploying function updates safely. Versions allow you to freeze the code and configuration of a function at a specific point in time, while aliases act as pointers to a specific version, enabling better deployment workflows, traffic shifting, and version management.
Each version is immutable—once published, it cannot be changed.
Version $LATEST refers to the most recently updated code/configuration.
Useful for tracking and rolling back changes.
Can be created via the Console, CLI, SDK, or IaC tools.
An alias is a named reference to a specific function version (e.g., 'prod', 'dev').
Aliases can be updated to point to a different version without changing the code.
You can split traffic between two versions using weighted aliases (e.g., 90% to v1, 10% to v2).
Helps with canary deployments and blue/green deployments.