class_docstr: LambdaOutput handles all alert dispatching to AWS Lambda
class_docstr_tok: ["LambdaOutput","handles","all","alert","dispatching","to","AWS","Lambda"]
docstr: Generates a boto3 client for the current AWS Lambda invocation. Will perform AssumeRole
  if an assume role is provided.
  
  Params:
      creds (dict): Result of _load_creds()
  
  Returns:
      boto3.session.Session.client
code: def _build_client(self, creds):
      """
      Generates a boto3 client for the current AWS Lambda invocation. Will perform AssumeRole
      if an assume role is provided.
  
      Params:
          creds (dict): Result of _load_creds()
  
      Returns:
          boto3.session.Session.client
      """
      client_opts = {"region_name": self.region}
  
      assume_role_arn = creds.get("assume_role_arn", False)
      if assume_role_arn:
          LOGGER.debug("Assuming role: %s", assume_role_arn)
          sts_connection = boto3.client("sts")
          acct_b = sts_connection.assume_role(
              RoleArn=assume_role_arn,
              RoleSessionName="streamalert_alert_processor",
          )
  
          client_opts["aws_access_key_id"] = acct_b["Credentials"][
              "AccessKeyId"
          ]
          client_opts["aws_secret_access_key"] = acct_b["Credentials"][
              "SecretAccessKey"
          ]
          client_opts["aws_session_token"] = acct_b["Credentials"][
              "SessionToken"
          ]
  
      return boto3.client("lambda", **client_opts)
  
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 3 for calling the LambdaOutputV2 obj's underlying member method code with example usage: obj._build_client(creds) and returns: boto3