4 ms·
How can this work on Cloud Functions/Amazon Lambda/Azure Functions without installing the dependencies each time it has to run? Haven't done anything before wi
by equasar 9y ago
How can this work on Cloud Functions/Amazon Lambda/Azure Functions without installing the dependencies each time it has to run?
Haven't done anything before with those serverless approaches.
- peterbaumgarten 9y agoIt probably will not run on AWS Lambda as the version of Node required by Puppeteer is too recent. From puppeteer readme[1] > Puppeteer requires Node version 7.10 or greater From AWS website[2] > AWS Lambda supports the following runtime versions: > Node.js – v4.3.2 and 6.10.3 [1] https://github.com/GoogleChrome/puppeteer/blob/master/README.md#installation https://github.com/GoogleChrome/puppeteer/blob/master/README... [2] http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html http://docs.aws.amazon.com/lambda/latest/dg/current-supporte...
- equasar 9y agosight... I checked Azure Functions and Cloud Functions and they are running 6.x versions of node as well.
- applejuice0 9y agoAWS Lambda presents a base image ready to be provisioned as multiple instances. If you are familiar with Docker you can think about Lambda image as a small Docker image, while real work will be done in instances (Docker containers) created from this image. Usual scenario is to provide ready to go image (with all source code, npm packages being installed, with Chrome Headless plugin, etc). Then AWS/Azure will run VM instances based on the image for almost every function request. Most of the time spinning such lite VMs takes no more than a couple of seconds.