createAlias
Creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.
You can also map an alias to split invocation requests between two versions. Use the RoutingConfig
parameter to specify a second version and the percentage of invocation requests that it receives.
Samples
fun main() {
//sampleStart
// The following example creates an alias named LIVE that points to version 1 of the my function Lambda
// function.
val resp = lambdaClient.createAlias {
functionName = "my-function"
name = "LIVE"
functionVersion = "1"
description = "alias for live version of function"
}
//sampleEnd
}