Handler context parameter. See AWS documentation.

interface Context {
    awsRequestId: string;
    callbackWaitsForEmptyEventLoop: boolean;
    clientContext?: ClientContext;
    functionName: string;
    functionVersion: string;
    identity?: CognitoIdentity;
    invokedFunctionArn: string;
    logGroupName: string;
    logStreamName: string;
    memoryLimitInMB: string;
    done(error?, result?): void;
    fail(error): void;
    getRemainingTimeInMillis(): number;
    succeed(messageOrObject): void;
    succeed(message, object): void;
}

Properties

awsRequestId: string
callbackWaitsForEmptyEventLoop: boolean
clientContext?: ClientContext
functionName: string
functionVersion: string
identity?: CognitoIdentity
invokedFunctionArn: string
logGroupName: string
logStreamName: string
memoryLimitInMB: string

Methods

  • Parameters

    • Optional error: Error
    • Optional result: any

    Returns void

    Deprecated

    Use handler callback or promise result

  • Parameters

    • error: string | Error

    Returns void

    Deprecated

    Use handler callback with first argument or reject a promise result

  • Returns number

  • Parameters

    • messageOrObject: any

    Returns void

    Deprecated

    Use handler callback with second argument or resolve a promise result

  • Parameters

    • message: string
    • object: any

    Returns void

    Deprecated

    Use handler callback or promise result