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.
publicconstructor()
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.
publiccall(cmd: string, correlationId: string, params: any = {}): Promise<any>
- cmd: string - action name to be called.
- correlationId: string - (optional) transaction id used to trace execution through the 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.
publiccallOneWay(cmd: string, correlationId: string, params: any = {}): Promise<any>
- cmd: string - action name to be called.
- correlationId: string - (optional) transaction id used to trace execution through the call chain.
- params: any - (optional) action parameters.
- returns: Promise<any> - action result.