Refactor into an npm package, serverless-plugin, and provide example handlers as individual Serverless functions
See original GitHub issueIt seems to make a lot of sense to turn serverless-chrome into an npm package, and separate Serverless plugin.
The plugin would hook into the Serverless after:createDeploymentArtifacts life cycle event and wrap around the handler function. The wrapper would then make sure that headless Chrome is running before calling the wrapped handler function.
https://serverless.com/framework/docs/providers/aws/guide/plugins/
- update for nodejs v6.10 (and remove Buffer.from hack/polyfill)
- refactor chrome bundle and chrome spawning into an npm package (npm:
lambda-chrome?) - Serverless plugin, using npm package
- use Rollup(docs) for npm packages
- remove
serverless-webpackplugin dependency - create Serverless functions for each example handler
- ~change postinstall script to create
serverless.ymlinstead ofconfig.jsfrom one of the exampleserverless.ymlfiles~ - update all the documentation
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Serverless Plugin Include Dependencies
This is a Serverless plugin that should make your deployed functions smaller. ... then individually adds each module file that your handler depends...
Read more >Lambda in TypeScript with Serverless Framework - Codetain
Today I'd like to show you how to create your own lambda function in typescript. To achieve this I'll use the serverless framework...
Read more >GitHub - juanjoDiaz/serverless-plugin-warmup
WarmUp solves cold starts by creating a scheduled lambda (the warmer) that invokes all the selected service's lambdas in a configured time interval...
Read more >AWS Serverless Development: Coding Best Practices
Use webpack to improve cold start and reduce package size. For Node.js functions, the Initialization time is a big part of the cold...
Read more >Serverless Node.js code with Azure Functions - Microsoft Learn
Azure Functions provides serverless code infrastructure, allowing you to create responsive, on-demand HTTP endpoints.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, thanks for all the work you’ve done! I was wondering if anyone could direct me to a web-scraping example (eg just rendering the DOM and returning it) of serverless-chrome that is deployable to aws lambda? I’ve been tinkering around with your package for a little while but haven’t had much luck
@adieuadieu That’s it! ClaudiaJS, by default, uploads the payload directly. However, it provides an option to upload via S3. Testing again, I was able to upload a larger payload:
Since your npm package includes the uncompressed binary, Claudia will in effect require the use of the
--use-s3-bucketto successfully upload. That’s a small price to pay for the resulting increase in spin-up speed, however.I’ll put together a PR with a Claudia example.