An attempt to create a performance testing suite for AWS lamnbdas
This project is a set of AWS Lambdas written in different languages to enable benchmarking each one. The idea is they'll perform typical real world user cases rather than being a simple "Hello, World!" Lambda.
To run the stack locally you'll need:
Once all the tools are correctly installed you can run the following command:
$ make sam-start
This will spin up local API Gateway on port 3000
.
To create the DynamoDB table run the following command:
$ make sam-create-table
There is also a Make target that can load some data in as well. This is done by running:
$ make sam-data-load
If the commands were all successful you sould be able to get a result back from making a HTTP request to localhost:3000/nodejs-810/football/english-premier-league/season-1718/result?HomeTeam=Arsenal&AwayTeam=Tottenham"
.
With curl
:
$ curl "localhost:3000/nodejs-810/football/english-premier-league/season-1718/result?HomeTeam=Arsenal&AwayTeam=Tottenham
With HTTPie:
$ http localhost:3000/nodejs-810/football/english-premier-league/season-1718/result HomeTeam=="Arsenal" AwayTeam=="Tottenham"
First fork this repo. Once forked you'll need:
- An AWS account
- A GitHub Personal Access Token, for more information see Creating a personal access token for the command line on the GitHub website.
In the folder deployments/cloudformation folder there are four files:
- master.yaml: This is the master CloudFormation template file that will deploy the other stacks.
- pipeline-roles.yaml: The CloudFormation template used to create the roles needed to run the build CodeBuild, CodePipeline and deploy the Lambdas.
- artifact-bucket.yaml: The CloudFormation template used to create the Amazon S3 bucket for the build artifacts.
- pipeline.yaml: The CloudFormation template used to create the AWS CodePipeline and the AWS CodeBuild steps to build and deploy the Lambdas.
To create the benchmark pipeline stack.
Once the stack is complete, we will need to trigger the build to deploy the Lambdas. The output of the stack will have a link to the AWS CodePipeline from where you can kick the build off.