class_docstr: Centralized config for handling configuration loading/parsing
class_docstr_tok: ["Centralized","config","for","handling","configuration","loading\/parsing"]
docstr: Load the configuration for this app invocation
  
  Args:
      event (dict): The AWS Lambda input event, which is JSON serialized to a dictionary
      context (LambdaContext): The AWS LambdaContext object, passed in via the handler.
  
  Returns:
      AppConfig: Configuration for the running application
docstr_tok: ["Load","the","configuration","for","this","app","invocation","Args",":","event","(","dict",")",":","The","AWS","Lambda","input","event",",","which","is","JSON","serialized","to","a","dictionary","context","(","LambdaContext",")",":","The","AWS","LambdaContext","object",",","passed","in","via","the","handler",".","Returns",":","AppConfig",":","Configuration","for","the","running","application"]
code: def load_config(cls, event, context):
      """Load the configuration for this app invocation
  
      Args:
          event (dict): The AWS Lambda input event, which is JSON serialized to a dictionary
          context (LambdaContext): The AWS LambdaContext object, passed in via the handler.
  
      Returns:
          AppConfig: Configuration for the running application
      """
      # Patch out the protected _remaining_ms method to the AWS timing function
      AppConfig.remaining_ms = context.get_remaining_time_in_millis
      func_name = context.function_name
      func_version = context.function_version
  
      # Get full parameter names for authentication and state parameters
      auth_param_name = "_".join([func_name, cls.AUTH_CONFIG_SUFFIX])
      state_param_name = "_".join([func_name, cls.STATE_CONFIG_SUFFIX])
  
      # Get the loaded parameters and a list of any invalid ones from parameter store
      params, invalid_params = cls._get_parameters(
          auth_param_name, state_param_name
      )
  
      # Check to see if the authentication param is in the invalid params list
      if auth_param_name in invalid_params:
          raise AppConfigError(
              "Could not load authentication parameter required for this "
              "app: {}".format(auth_param_name)
          )
  
      LOGGER.debug(
          "Retrieved parameters from parameter store: %s",
          cls._scrub_auth_info(params, auth_param_name),
      )
      LOGGER.debug(
          "Invalid parameters could not be retrieved from parameter store: %s",
          invalid_params,
      )
  
      # Load the authentication info. This data can vary from service to service
      auth_config = {
          key: value if isinstance(value, str) else value
          for key, value in params[auth_param_name].items()
      }
      state_config = params.get(state_param_name, {})
  
      return AppConfig(
          auth_config, state_config, event, func_name, func_version
      )
  
imports: import calendar
  from datetime import datetime
  import json
  import re
  import time
  import backoff
  import boto3
  from botocore import client
  from botocore.exceptions import ClientError
  from streamalert.apps.exceptions import AppAuthError, AppConfigError, AppStateError
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 11 for calling the AppConfig obj's underlying member method code with example usage: obj.load_config(cls, event, context) and returns: AppConfig