'Get all of the rule names associated with a lambda function.'

def get_event_rule_names_for_lambda(self, lambda_arn):

    response = self.events_client.list_rule_names_by_target(TargetArn=lambda_arn)
    rule_names = response['RuleNames']
    while ('NextToken' in response):
        response = self.events_client.list_rule_names_by_target(TargetArn=lambda_arn, NextToken=response['NextToken'])
        rule_names.extend(response['RuleNames'])
    return rule_names
