Class GenericControllerAbstract

An abstract class to inherit to manage some resources with an AWS Lambda function.

Hierarchy (view full)

Constructors

Properties

callback: any
event: any
logger: LambdaLogger = ...

Methods

  • Default callback for the Lambda.

    Parameters

    • error: any = null
    • Optionalres: any

    Returns void

  • Get the current log level for the current Lambda function's logger. Note: "FATAL" means that no log will be printed.

    Returns
        | "TRACE"
        | "DEBUG"
        | "INFO"
        | "WARN"
        | "ERROR"
        | "FATAL"

  • The main function (to override), that handles the request and must terminate invoking the method done.

    Returns Promise<void>

  • Set the log level for the current Lambda function's logger.

    Parameters

    • logLevel:
          | "TRACE"
          | "DEBUG"
          | "INFO"
          | "WARN"
          | "ERROR"
          | "FATAL"

    Returns void

  • Raise the log level of the current Lambda function's logger to "FATAL", hence avoiding printing any log.

    Returns void