luqmanrom / aws-lambda-docker-research

Testing cold-start and performance for custom docker images, launching chrome as an example workload

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Puppeteer performance in AWS Lambda Docker containers

This repo contains all code and scripts, used in article https://dev.to/megabotan/puppeteer-performance-in-aws-lambda-docker-containers-2325

Local run

You need to setup docker, and download aws-lambda-rie binaries ./download_rie.sh

Run custom docker lambda image

./custom_build.sh && ./custom_run.sh

Run AWS based docker image

./aws_based_build.sh && ./aws_based_run.sh

Test running image locally

curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"url": "https://example.com"}'

Deploy

First you have to setup AWS CLI. Don't forget to set credentials and region in AWS cli config files. After that install SAM CLI.

All deploy steps are in deploy/push_image_and_deploy_lambda.sh

About

Testing cold-start and performance for custom docker images, launching chrome as an example workload

License:MIT License


Languages

Language:JavaScript 55.0%Language:Shell 26.4%Language:Dockerfile 18.5%