https://github.com/scrapingant/aws-lambda-docker-research
Testing cold-start and performance for custom docker images, launching chrome as an example workload
https://github.com/scrapingant/aws-lambda-docker-research
Last synced: 5 months ago
JSON representation
Testing cold-start and performance for custom docker images, launching chrome as an example workload
- Host: GitHub
- URL: https://github.com/scrapingant/aws-lambda-docker-research
- Owner: ScrapingAnt
- License: mit
- Created: 2021-04-21T16:50:52.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T08:05:41.000Z (over 2 years ago)
- Last Synced: 2023-03-06T07:57:08.372Z (about 2 years ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). Don't forget to set credentials and region in AWS cli config files.
After that install [SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html).All deploy steps are in `deploy/push_image_and_deploy_lambda.sh`