# Update $LATEST version of function
aws lambda update-function-code --function-name myfunction ….
# Publish new version of function
aws lambda publish-version --function-name myfunction
# Point alias to new version, weighted at 5% (original version at 95% of traffic)
aws lambda update-alias --function-name myfunction --name myalias --routing-config '{"AdditionalVersionWeights" : {"2" : 0.05} }'
# Verify that the new version is healthy
…
# Set the primary version on the alias to the new version and reset the additional versions (100% weighted)
aws lambda update-alias --function-name myfunction --name myalias --function-version 2 --routing-config '{}'
xxxxxxxxxx
Description of input parameters
function-name: The name of the Lambda function to deploy
alias-name: The name of the alias used to invoke the Lambda function
new-version: The version identifier for the new version to deploy
steps: The number of times the new version weight is increased
interval: The amount of time (in seconds) to wait between weight updates
type: The function to use to generate the weights. Supported values: “linear”