This repo contains a serverless application that takes a HTML template and return a PDF in form of a binary
-
Clone this repo
git clone https://github.com/zahaar/generate-pdf-lambda -
Import cUrl to Insomnia ( Postman is not recommended, as it can't visualize Pdf ).
-
Run
make api-localto have local API GW running. -
Send
cUrlrequest via Insomnia.
You can also invoke Lambda bypassing API GW, by supplying an example event in file, and running
make invokation-local. The response would be a base64 encoded PDF binary.
A configured AWS CLI V2 is a must -> AWS Console Account && API Keys
-
make deploy -
Fetch AWS SAM deploy output URL
Value, and change the Url in Insomnia fromlocalhostto that value. execution result in Insomnia
- Add Authorization Layer to API GW.
- Configure API GW rate limits and throttling.
- Enable API GW cache.
