You can create aliases for your Lambda function. A Lambda alias is a pointer to a function version that you can update. The function's users can access the function version using the alias Amazon Resource Name (ARN). When you deploy a new version, you can update the alias to use the new version, or split traffic between two versions.
Open theFunctions page of the Lambda console.
Choose a function.
ChooseAliases and then chooseCreate alias.
On theCreate alias page, do the following:
Enter aName for the alias.
(Optional) Enter aDescription for the alias.
ForVersion, choose a function version that you want the alias to point to.
(Optional) To configure routing on the alias, expandWeighted alias. For more information, seeImplement Lambda canary deployments using a weighted alias.
ChooseSave.
To create an alias using the AWS Command Line Interface (AWS CLI), use thecreate-alias command.
aws lambda create-alias \ --function-namemy-function
\ --namealias-name
\ --function-versionversion-number
\ --description " "
To change an alias to point a new version of the function, use theupdate-alias command.
aws lambda update-alias \ --function-namemy-function
\ --namealias-name
\ --function-versionversion-number
To delete an alias, use thedelete-alias command.
aws lambda delete-alias \ --function-namemy-function
\ --namealias-name
The AWS CLI commands in the preceding steps correspond to the following Lambda API operations: