def function_absent(name, FunctionName, region=None, key=None, keyid=None, profile=None):

    ret = {'name': FunctionName,
           'result': True,
           'comment': '',
           'changes': {}
           }

    r = __salt__['boto_lambda.function_exists'](FunctionName, region=region,
                                    key=key, keyid=keyid, profile=profile)
    if 'error' in r:
        ret['result'] = False
        ret['comment'] = 'Failed to delete function: {0}.'.format(r['error']['message'])
        return ret

    if r and not r['exists']:
        ret['comment'] = 'Function {0} does not exist.'.format(FunctionName)
        return ret

    if __opts__['test']:
        ret['comment'] = 'Function {0} is set to be removed.'.format(FunctionName)
        ret['result'] = None
        return ret
    r = __salt__['boto_lambda.delete_function'](FunctionName,
                                    region=region, key=key,
                                    keyid=keyid, profile=profile)
    if not r['deleted']:
        ret['result'] = False
        ret['comment'] = 'Failed to delete function: {0}.'.format(r['error']['message'])
        return ret
    ret['changes']['old'] = {'function': FunctionName}
    ret['changes']['new'] = {'function': None}
    ret['comment'] = 'Function {0} deleted.'.format(FunctionName)
    return ret
Ensure function with passed properties is absent.
dataset/ETHPy150Open saltstack/salt/salt/states/boto_lambda.py/function_absent