We've already seen how to use benchmark tools, such as Apache Benchmark, and how to test harness. In this section, we will look at how to use the Lambda itself as a serverless testing test platform.
The idea is simple: we will write a Lambda function that will call the Lambda function we want to test, and write its result to a DynamoDB table for reporting. Fortunately, no coding is required here, as the Lambda function is already available in the Blueprints section:
Give the function a name and create a new IAM role, as described in the following schema:
Click on Create function and the function should be created with permissions granted to perform the following:
- Push logs to CloudWatch.
- Invoke other Lambda functions.
- Write data to the DynamoDB table.
The following screenshot gives you the glimpse of after the preceding task is completed:
Before launching...