chrome-aws-lambda
serverless-webpack
Our great sponsors
chrome-aws-lambda | serverless-webpack | |
---|---|---|
12 | 5 | |
3,132 | 1,717 | |
- | -0.1% | |
0.0 | 9.3 | |
10 months ago | 7 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
chrome-aws-lambda
-
Lambdas vs EC2
Lambda would be my choice for this. You could even stay within the free tier depending how often you run this process. You can orchestrate puppeteer UI flows in lambda using this package https://github.com/alixaxel/chrome-aws-lambda My team does this and it works great.
-
Building a PDF Generator using AWS Lambda
git clone --depth=1 https://github.com/alixaxel/chrome-aws-lambda.git && \ cd chrome-aws-lambda && \ make chrome_aws_lambda.zip
- Ask HN: What are the best tools for web scraping in 2022?
- Is it possible to use functions requiring a GPU in a serverless google cloud function?
-
Dynamic Open Graph images with Next.js
When requesting the API route, the Next.js serverless function will actually spin up a web browser on the server (a headless instance of Chromium, using chrome-aws-lambda). Next, a webpage will be generated with HTML we can define ourselves. This HTML will be used to construct the image. That means that as a developer we can generate images using HTML and CSS, technologies we are already familiar with!
-
How we keep our Serverless deploy times short and avoid headaches
This plugin is used for all our AWS Lambda deployments, using a wide range of Node modules, some with more quirks than others. We use it together with Lambda Layer Sharp and Chrome AWS Lambda.
-
How to create a chrome profile programmatically in aws lambda?
I was able to successfully to run chrome with puppeteer in AWS Lambda for a similar use case. I used an "optimized" version of chrome packaged as an AWS Lambda Layer.
-
Create PDF documents with AWS Lambda + S3 with NodeJS and Puppeteer
git clone --depth=1 https://github.com/alixaxel/chrome-aws-lambda.git && \ cd chrome-aws-lambda && \ make chrome_aws_lambda.zip
-
chrome binary not found aws lambda
Simplest method use ]Puppeteer](https://blog.risingstack.com/pdf-from-html-node-js-puppeteer/) with chrome-aws-lambda.
-
Puppeteer performance in AWS Lambda Docker containers
For example, we can use chrome-aws-lambda binaries. They were built to fit Lambda layers, so the size is much smaller than regular chrome installation.
serverless-webpack
-
Using pure ESM npm packages in serverless-webpack bundles
Since I was using serverless-webpack along with Prisma's serverless-webpack-prisma helper, this meant a bit of extra Webpack config setup to get it all using the same module syntax without the usual dreaded 'Unexpected token export' or import error from Node.
-
Migrating a classic Express.js to Serverless Framework
As you can see in the above handler.js file, we're getting CommonJS instead of modern JavaScript or TypeScript. To get these, you need webpack or some other bundler. serverless-webpack exists if you want full control over your ecosystem, but there is also serverless-bundle that gives you a set of reasonable defaults on webpack 4 out of the box. We opted into this option to get us started quickly.
-
Running a scalable & reliable GraphQL endpoint with Serverless
cd app-backend/dynamodb yarn install To test the GraphQL endpoint locally on my machine, I’m using these three plugins for the Serverless Framework: Serverless Offline, Serverless Webpack and Serverless DynamoDB Local.
-
How we keep our Serverless deploy times short and avoid headaches
Serverless Webpack
-
Package your NodeJS Lambda functions individually with esbuild for faster cold-start times
The serverless framework supports an excellent workflow with the serverless-webpack plugin to package your functions individually with webpack. For AWS SAM, it's probably worth checking out the aws-sam-webpack-plugin, but I've found it far simpler to configure esbuild to perform the same task.
What are some alternatives?
esbuild - An extremely fast bundler for the web
serverless-jetpack - A faster JavaScript packager for Serverless applications.
serverless-plugin-tree-shake - Shake the dependency tree and only package files needed
lambda-layer-sharp - An AWS Lambda Layer for the Sharp node module. Automatically published on updates.
terraform-aws-next-js - Terraform module for building and deploying Next.js apps to AWS. Supports SSR (Lambda), Static (S3) and API (Lambda) pages.
puppeteer - Node.js API for Chrome
chrome-aws-lambda-layer - 58 MB Google Chrome to fit inside AWS Lambda Layer compressed with Brotli
Knex - A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
serverless-graphql - Serverless GraphQL Examples for AWS AppSync and Apollo
next-api-og-image - :bowtie: Easy way to generate open-graph images dynamically in HTML or React using Next.js API Routes. Suitable for serverless environment.
AWS-Lambda-Docker - Puppeteer running in Docker on AWS Lambda