class_docstr: High throughput Alert delivery to AWS S3
class_docstr_tok: ["High","throughput","Alert","delivery","to","AWS","S3"]
docstr: Send alert to a Kinesis Firehose Delivery Stream
  
  Publishing:
      By default this output sends the current publication in JSON to Kinesis.
      There is no "magic" field to "override" it: Simply publish what you want to send!
  
  Args:
      alert (Alert): Alert instance which triggered a rule
      descriptor (str): Output descriptor
  
  Returns:
      bool: True if alert was sent successfully, False otherwise
code: def _dispatch(self, alert, descriptor):
      """Send alert to a Kinesis Firehose Delivery Stream
  
      Publishing:
          By default this output sends the current publication in JSON to Kinesis.
          There is no "magic" field to "override" it: Simply publish what you want to send!
  
      Args:
          alert (Alert): Alert instance which triggered a rule
          descriptor (str): Output descriptor
  
      Returns:
          bool: True if alert was sent successfully, False otherwise
      """
  
      @backoff.on_exception(
          backoff.fibo,
          ClientError,
          max_tries=self.MAX_BACKOFF_ATTEMPTS,
          jitter=backoff.full_jitter,
          on_backoff=backoff_handler(),
          on_success=success_handler(),
          on_giveup=giveup_handler(),
      )
      def _firehose_request_wrapper(json_alert, delivery_stream):
          """Make the PutRecord request to Kinesis Firehose with backoff
  
          Args:
              json_alert (str): The JSON dumped alert body
              delivery_stream (str): The Firehose Delivery Stream to send to
  
          Returns:
              dict: Firehose response in the format below
                  {'RecordId': 'string'}
          """
          self.__aws_client__.put_record(
              DeliveryStreamName=delivery_stream,
              Record={"Data": json_alert},
          )
  
      if self.__aws_client__ is None:
          self.__aws_client__ = boto3.client(
              "firehose", region_name=self.region
          )
  
      publication = compose_alert(alert, self, descriptor)
  
      json_alert = json.dumps(publication, separators=(",", ":")) + "\n"
      if len(json_alert) > self.MAX_RECORD_SIZE:
          LOGGER.error(
              "Alert too large to send to Firehose: \n%s...",
              json_alert[0:1000],
          )
          return False
  
      delivery_stream = self.config[self.__service__][descriptor]
      LOGGER.info(
          "Sending %s to aws-firehose:%s", alert, delivery_stream
      )
  
      _firehose_request_wrapper(json_alert, delivery_stream)
      LOGGER.info(
          "%s successfully sent to aws-firehose:%s",
          alert,
          delivery_stream,
      )
  
      return True
  
imports: from abc import abstractmethod
  from collections import OrderedDict
  from email.mime.application import MIMEApplication
  from email.mime.multipart import MIMEMultipart
  from email.mime.text import MIMEText
  from datetime import datetime
  import json
  import uuid
  import backoff
  from botocore.exceptions import ClientError
  import boto3
  from streamalert.alert_processor.helpers import compose_alert, elide_string_middle
  from streamalert.alert_processor.outputs.output_base import OutputDispatcher, OutputProperty, StreamAlertOutput
  from streamalert.shared.backoff_handlers import backoff_handler, success_handler, giveup_handler
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 2 for calling the KinesisFirehoseOutput obj's underlying member method code with example usage: obj._dispatch(alert, descriptor) and returns: True, False