TestLambdaClient

AWS Lambda client used for automated testing.

Extends: LambdaClient

Description

The TestLambdaClient class allows you to create an AWS Lambda client that can be used for automated testing.

Constructors

Creates an instance of this class.

public constructor()

Instance methods

call

Calls a remote action in AWS Lambda function. The name of the action is added as “cmd” parameter to the action parameters.

public call(cmd: string, context: IContext, params: any = {}): Promise<any>

  • cmd: string - action name to be called.
  • context: IContext - (optional) a context to trace execution through a call chain.
  • params: any - (optional) action parameters.
  • returns: Promise<any> - action result.

callOneWay

Calls an AWS Lambda Function action asynchronously without waiting for the response.

public callOneWay(cmd: string, context: IContext, params: any = {}): Promise<any>

  • cmd: string - action name to be called.
  • context: IContext - (optional) a context to trace execution through a call chain.
  • params: any - (optional) action parameters.
  • returns: Promise<any> - action result.