Converting HTML to PDF on AWS Lambda.
Using:
- Bref + Serverless Framework to deploy the function;
- wkhtmltopdf binary as a layer. If you want to compile your own layer: Compiling wkhtmltopdf for use inside an AWS Lambda
Input:
{
"html": "<html>..."
}
Output:
Base64 PDF.
JVBERi0xLjQKMSAwIG9iago8 ...
Suggestion of pre-compiled layers:
https://github.com/brandonlim-hs/wkhtmltopdf-aws-lambda-layer