Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.1 KB

README.md

File metadata and controls

47 lines (29 loc) · 1.1 KB

What's in here

  • AWS: Amazon cloud provider

  • Pulumi: Infrastructure as Code for Engineers

Notes

  • This is a simple service: simple authentication were used, no queue, no streaming

Setup Pulumi

  • To create a new project
mkdir my-project && cd my-project && pulumi new

then Pulumi will walk you through the setup of your project

  • Install pdf generation dependencies
npm install @sparticuz/chromium-min puppeteer-core generic-pool

we used @frimuchkov/hpdf source code in combination with @sparticuz/chromium

you need to host chromium-v110.0.1-pack.tar in a separate bucket in your s3 account, then add the public url to the s3FilePath variable in lambda/generate-pdf.ts

also don't forget to set ALLOWED_SECRET in lambda/index.ts to a random string

you may need to add this to your tsconfig.ts

...
+    "esModuleInterop": true,
...

Deployment

pulumi up

the deployment will take a while, then return a url to your service