Removes what `build_lambda()`, `deploy_lambda()` and `schedule_lambda()`
created for `tag`: the function's EventBridge schedules, the function, its
execution roles, the ECR repository with its images, the function's
CloudWatch log group, and the local Docker image. Resources that don't
exist are skipped, so it also cleans up after a failed deploy.
Usage
delete_lambda(tag, keep_ecr_image = FALSE, keep_local_image = FALSE)
Arguments
- tag
The tag used with `build_lambda()` and `deploy_lambda()`, which
is also the function name.
- keep_ecr_image
logical, whether to keep the ECR repository and its
images (default: FALSE)
- keep_local_image
logical, whether to keep the local Docker image
(default: FALSE)
Value
Invisibly, a list with the names of the deleted resources.
Details
Only roles named `<tag>–<uuid>`, as `deploy_lambda()` names them, are
deleted. A role passed to `deploy_lambda(role_arn = )` is kept. A
schedule rule that also targets other resources is kept, without this
function as a target.
Examples
if (FALSE) { # \dontrun{
delete_lambda("parity1")
} # }