deleteFunction
inline suspend fun LambdaClient.deleteFunction(crossinline block: DeleteFunctionRequest.Builder.() -> Unit): DeleteFunctionResponse
Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted. This doesn't require the user to have explicit permissions for DeleteAlias.
A deleted Lambda function cannot be recovered. Ensure that you specify the correct function name and version before deleting.
To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon Web Services services and resources that invoke your function directly, delete the trigger in the service where you originally configured it.
Samples
fun main() {
//sampleStart
// The following example deletes version 1 of a Lambda function named my function.
lambdaClient.deleteFunction {
functionName = "my-function"
qualifier = "1"
}
//sampleEnd
}