Headless Chrome on AWS Lambda
Why running Headless Chrome yourself in Lambda or containers is painful, and how API2PDF gives you the same engine with Puppeteer-style options as a REST API.
Api2Pdf runs Headless Chrome on AWS Lambda. PDF generation on a serverless architecture like AWS Lambda has several advantages: 1) You only pay for the processing power to generate the PDFs when you need it. 2) It scales infinitely. 3) You can handle massively large files and CPU usage or a just a tiny bit.
Instead of running your own VMs at full capacity on the off-chance someone is going to generate a huge PDF and crush your server, serverless solves this problem.
After building PDF generation API tech stack to service our own needs, we spent some time retooling it so that every developer can sign up and get started within minutes.
Api2Pdf offers three endpoints for Headless Chrome:
- URL to PDF (Simple GET Request)
- URL to PDF (POST with advanced Headless Chrome options)
- HTML to PDF (POST with advanced Headless Chrome options)
An example of a simple GET request with the HTML to PDF API is:
https://v2018.api2pdf.com/chrome/url?url={UrlToConvert}&apikey={Your-Api-Key}
Next Steps
Create Account and Explore the Docs
Questions?
Don’t hesitate to contact us.
Generate your first PDF in minutes
Create an account, grab an API key, and send one POST request. One month of free credit, then pay only for what you use.