def do_cli(ctx, host, port, template, env_vars, debug_port, debug_args,  <EOL>debugger_path, docker_volume_basedir, docker_network, log_file, layer_cache_basedir, skip_pull_image,<EOL>force_image_build, parameter_overrides):
LOG.debug("<STR_LIT>")<EOL>try:<EOL><INDENT>with InvokeContext(template_file=template,<EOL>function_identifier=None,  <EOL>env_vars_file=env_vars,<EOL>docker_volume_basedir=docker_volume_basedir,<EOL>docker_network=docker_network,<EOL>log_file=log_file,<EOL>skip_pull_image=skip_pull_image,<EOL>debug_port=debug_port,<EOL>debug_args=debug_args,<EOL>debugger_path=debugger_path,<EOL>parameter_overrides=parameter_overrides,<EOL>layer_cache_basedir=layer_cache_basedir,<EOL>force_image_build=force_image_build,<EOL>aws_region=ctx.region) as invoke_context:<EOL><INDENT>service = LocalLambdaService(lambda_invoke_context=invoke_context,<EOL>port=port,<EOL>host=host)<EOL>service.start()<EOL><DEDENT><DEDENT>except (InvalidSamDocumentException,<EOL>OverridesNotWellDefinedError,<EOL>InvalidLayerReference,<EOL>DebuggingNotSupported) as ex:<EOL><INDENT>raise UserException(str(ex))<EOL><DEDENT>
Implementation of the ``cli`` method, just separated out for unit testing purposes