Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • A middy middleware that adds the current Lambda invocation's context inside all log items.

    example
    import { Logger, injectLambdaContext } from "@aws-lambda-powertools/logger";

    import middy from '@middy/core';


    const logger = new Logger();

    const lambdaHandler = async (_event: any, _context: any) => {
    logger.info("This is an INFO log with some context");
    };


    export const handler = middy(lambdaHandler).use(injectLambdaContext(logger));

    Parameters

    Returns MiddlewareObj<any, any, Error, Context>

    • The middy middleware object

Generated using TypeDoc