- Understand how RAM selection affect Lambda's performance (on Medium).
- Code a tool that measures Lambda function performance (duration and cost) with several memory sizes.
git clone git@github.com:epsagon/lambda-memory-performance-benchmark.git
cd lambda-memory-performance-benchmark/
pip install -r requirements.txt
python benchmark.py -f <function_name> -r <function_region> -p <payload_filename>
Basic run:
python benchmark.py -f lambda-performance-benchmark -r us-east-1 -p fibonacci-function/payload.json
Chart:
Table:
Memory Size Duration (in ms) Price Per 1M Invocations (in $) 128MB 376.05 83.2 192MB 250.24 93.9 256MB 198.56 83.4 512MB 98.36 83.4 768MB 65.48 125.0 1024MB 45.31 166.7 1536MB 30.53 250.1 2048MB 25.21 333.4 2560MB 25.36 416.8 3008MB 25.15 489.7