#NEWLINE# def function_exists( FunctionName , region = None , key = None , keyid = None , profile = None ) : #NEWLINE# #INDENT# '\n    Given a function name, check to see if the given function name exists.\n\n    Returns True if the given function exists and returns False if the given\n    function does not exist.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt myminion boto_lambda.function_exists myfunction\n\n    ' #NEWLINE# try : #NEWLINE# #INDENT# func = _find_function ( FunctionName , region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# return { #NEWLINE# #INDENT# 'exists' : bool ( func ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# except ClientError as e : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'error' : salt . utils . boto3 . get_error ( e ) , #NEWLINE# #UNINDENT# }