To get started,
- Clone the project.
- Run
npm install
. - Install serverless globally:
npm install -g serverless
. - Configure
aws_access_key_id
andaws_secret_access_key
credentials. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html - Ensure that your default AWS
region
(configured in ~/.aws/config, for example) matches the default inserverless.yml
, which isus-east-1
. - To invoke the lambda locally, run
npm start
. The serverless-offline service will output a lambda endpoint: the default ishttp://localhost:3002
.The local function name isoffline: Offline [http for lambda] listening on http://localhost:3002
pdf-lambda-puppeteer-local-pdf
. - To deploy the lambda, run
npm run deploy-prod
. The prod function name ispdf-lambda-puppeteer-prod-pdf
. - Enjoy generating PDF documents :)