publishVersion
Creates a version from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change.
Lambda doesn't publish a version if the function's configuration and code haven't changed since the last version. Use UpdateFunctionCode or UpdateFunctionConfiguration to update the function before publishing a version.
Clients can invoke versions directly or with an alias. To create an alias, use CreateAlias.
Samples
fun main() { //sampleStart // This operation publishes a version of a Lambda function val resp = lambdaClient.publishVersion { functionName = "myFunction" codeSha256 = "" description = "" } //sampleEnd }