Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Lambda Performance Benchmark

This repository contains quickly hacked scripts to measure API Gateway, Lambda and VPC performance.

Was done for the purpose of this article.

DISCLAIMER: Use at your own risk. Quickly hacked. Main purpose was to analyze data in R, not to write a nicely looking and well documented scripts.


|- api/        - API Gateway Swagger template & deploy script
|- benchmark/  - Benchmark & keep alive Python scripts
   |- csv/     - Gathered data
   |- html/    - HTML pages with analysis of csv/ content
   |- r/       - R scripts for csv/ analysis
|- lambda/     - Python, JavaScript and ClojureScript lambda functions
                 with deployment script



  • make, lein
  • awscli
  • scripta
  • Python 3.5

Environment Variables

You have to provide following env variables:

export AWS_DEFAULT_REGION=eu-west-1
export AWS_ACCOUNT_ID=123456789012
export LAMBDA_ROLE_NAME=JustTheRoleName
export VPC_SUBNET=subnet-abcdefgh
export VPC_SECURITY_GROUP=sg-abcdefgh
export REST_API_ID=abcdefghi
export REST_API_KEY=your-api-gateway-api-key

There's file. You can edit it and provide env variables via source ./


  • Provide env variables
cd lambda/cljs
cd ../js
make deploy
cd ../python
make deploy
  • Lambda functions in Python, Clojurescript, JavaScript languages
  • Lambda functions are deployed in 128, 256, 512, 768, 1024, 1280, 1536 MB variants
  • Lambda functions are deployed with VPC and without VPC
    • With VPC to test ENI pull time
  • Lambda function name is Performance$LANG$MEMORY or Performance$LANGVPC$MEMORY
  • 42 lambda functions deployed

API Gateway

  • Create REST API in the console
  • Provide env variables
cd api


What it does?

  • Sleeps for 0, 5, 10, 15, 30, 60, 300, 600, 900, 1800, 3600 seconds
    • Issues 30 requests for every endpoint and measure durations
    • Requests issued via 10 workers (parallel requests)
  • CSV file is generated at the end

Generate CSV

cd benchmark
You can’t perform that action at this time.