Invoke an AWS Lambda function after an Artillery test run with your load test metrics and events.
This plugin uses the AWS SDK for JavaScript (V3). Read the documentation for the SDK to properly set the credentials you need to invoke the Lambda function.
config:
plugins:
lambda:
function: "NameOfLambdaFunction"
region: "aws-region"
Configuration Setting | Value |
---|---|
function |
The name of your AWS Lambda function. |
region |
The AWS region where your Lambda function is deployed. |
After configuring the plugin, run your Artillery load test as usual. When the test run is completed, the plugin will invoke the defined Lambda function in the AWS region specified in the configuration. The Lambda function will receive a payload with the metrics and events from the test run.
You can view debug messages by setting the DEBUG=plugin:lambda
environment variable when running your Artillery test:
DEBUG=plugin:lambda npx artillery run my-test-script.yml