code: 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']
          # Iterate when the results are paginated
          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
docs: Get all of the rule names associated with a lambda function.