Convert HTML to PDF using wkhtmltopdf on AWS Lambda
{
"data" : "<h1>Claudemiro</h1>",
"filename": "optional filename",
"pagesize": "optional pagesize default: a4",
"bucket": "s3 bucket to use for output"
}
{
"filename": "8rqj9td0pvjf9a4i.pdf"
}
- Make sure AWS Lambda function has
PutObject
access to S3 bucket - Download the binary wkhtmltopdf for linux-x64 and put in the current directory
- Run npm install
- Zip everything and upload to aws-lambda