Next, we are going to take a look at Locust, which is a Python tool for performance and load testing. Then we are going to talk about strategies to reduce the API's latency and improve the response time of the API, and using Locust will show us the performance improvements.
Loading and end-to-end testing at scale
Load testing your serverless microservice
First, you need to have a serverless microservice stack running with ./build-package-deploy-lambda-dynamo-data-api.sh, and have loaded data into the DynamoDB table using the python3 dynamo_insert_items_from_file.py Python script.
Then install Locust, if it hasn't already been installed with the other packages in requirements.txt:
$ sudo pip3 install locustio
Locust...