finds.dev← search

// the find

alixaxel/chrome-aws-lambda

★ 3,286 · TypeScript · MIT · updated Sep 2024

Chromium Binary for AWS Lambda and Google Cloud Functions

A pre-compiled Chromium binary and thin wrapper layer for running Puppeteer or Playwright inside AWS Lambda and Google Cloud Functions. The main thing it solves is the Lambda deployment package size limit — a 130 MB binary gets Brotli-compressed down to ~33 MB, then decompressed at cold start. Useful for anyone doing PDF generation, screenshots, or scraping in serverless without managing their own layer.

The Brotli compression story is genuinely well-executed — the benchmarks are included, the tradeoff between compression ratio and decompression speed is documented, and they picked the right level. The puppeteer overload API (fillFormByLabel, clickAndWaitForNavigation, waitForInflightRequests, etc.) saves a lot of boilerplate for anyone doing heavy scraping. Font provisioning via the font() method handles a real pain point — Amazon Linux 2 ships with no fonts, which silently breaks rendering. Playwright support alongside Puppeteer means you're not locked to one browser automation API.

The last push was September 2024 and the newest Chromium in the version table is v92 from mid-2021 — the project is effectively unmaintained, which matters a lot for a security-sensitive component like a browser binary. AWS Lambda's 512 MB /tmp limit and 250 MB unzipped layer limit are hard constraints this library dances right up against; the README buries the 1600 MB RAM recommendation without explaining why (cold-start decompression). The Ansible playbook for compiling your own Chromium exists but has zero documentation on what EC2 instance type you need or how long it takes. There's no guidance on ARM/Graviton Lambda runtimes, which are cheaper and now mainstream.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →