aws-lambda-benchmark

module
v0.0.0-...-b42fe78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2019 License: Apache-2.0

README

AWS Lambda performance testing

An attempt to create a performance testing suite for AWS lamnbdas

Overview

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.

Working locally

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"

Deploying the code

Pre-reqs

First fork this repo. Once forked you'll need:

The AWS CodePipeline

In the folder deployments/cloudformation folder there are four files:

  1. master.yaml: This is the master CloudFormation template file that will deploy the other stacks.
  2. pipeline-roles.yaml: The CloudFormation template used to create the roles needed to run the build CodeBuild, CodePipeline and deploy the Lambdas.
  3. artifact-bucket.yaml: The CloudFormation template used to create the Amazon S3 bucket for the build artifacts.
  4. 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.

Directories

Path Synopsis
lambdas
tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL