Skip to content
PDF generator for AWS lambda with puppeteer
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Initial release Jul 22, 2019
.gitignore Initial release Jul 22, 2019
LICENSE Create LICENSE Nov 11, 2019
README.md Initial release Jul 22, 2019
package-lock.json Updated packages to use nodejs10.x and puppeteer 2 Jan 22, 2020
package.json Updated packages to use nodejs10.x and puppeteer 2 Jan 22, 2020
pdf.js Initial release Jul 22, 2019
serverless.yml Updated packages to use nodejs10.x and puppeteer 2 Jan 22, 2020

README.md

AWS lambda PDF generator example

The purpose of this repository is to demonstrate a PDF generator inside AWS lambda with chrome-aws-lambda, serverless, pug and knex. This has been done as part of the article in dev.to

Setup

  1. Initialize serverless either inside project or globally (after installing package globally) with
serverless
  1. Modify PUG template inside src/
  2. Fetch data for the template. In this repository we use knex and postgresSQL. For production use I would suggest to add database username and password to environmental variables either inside deployment platform or in AWS.
  3. Deploy with
npm run deploy:dev
You can’t perform that action at this time.