def deploy(<EOL>src, requirements=None, local_package=None,<EOL>config_file='<STR_LIT>', profile_name=None,<EOL>preserve_vpc=False<EOL>):
<EOL>path_to_config_file = os.path.join(src, config_file)<EOL>cfg = read_cfg(path_to_config_file, profile_name)<EOL>path_to_zip_file = build(<EOL>src, config_file=config_file,<EOL>requirements=requirements,<EOL>local_package=local_package,<EOL>)<EOL>existing_config = get_function_config(cfg)<EOL>if existing_config:<EOL><INDENT>update_function(cfg, path_to_zip_file, existing_config, preserve_vpc=preserve_vpc)<EOL><DEDENT>else:<EOL><INDENT>create_function(cfg, path_to_zip_file)<EOL><DEDENT>
Deploys a new function to AWS Lambda.

    :param str src:
        The path to your Lambda ready project (folder must contain a valid
        config.yaml and handler module (e.g.: service.py).
    :param str local_package:
        The path to a local package with should be included in the deploy as
        well (and/or is not available on PyPi)