This package runs load tests against Lambda functions.
Install using npm
:
npm install lambda-loadtester
Create a file aws-config.json
in the project root directory,
which should contain your AWS credentials and target region:
{
"accessKeyId": "AKIA...",
"secretAccessKey": "...",
"region": "eu-west-3"
}
To run your first test:
node bin/run.js --endpoint [name] --body "{}"
The following options are available:
The function to invoke, mandatory.
Number of total invocations to run, default 1.
Number of parallel invocations on the fly, default 1.
The payload to send to the lambda function. No default.
Path to a file that contains a JSON document to send as the body.
The Lambda function is invoked as many times as the parameter --number [n]
.
When --concurrency c
is specified,
there will be at most c
invocations in flight at the same time.
For every variable in the result it is shown: total number of values, average and standard deviation.
(C) 2020 Alex Fernández.
Licensed under the MIT license.