HTML content with HTTPS links like this cause lambda to respond with a 502 error:
I used this to render the HTML:
await page.goto(data:text/html;base64,${Buffer.from(html).toString('base64')}, {
waitUntil: 'networkidle0'
});
I also tried this:
await page.setContent(html);
When I changed the links to HTTP, the HTML rendered as expected.
I wrangled with this for several hours and then moved to chrome-aws-lambda and the issue went away without changing the puppeteer code.
HTML content with HTTPS links like this cause lambda to respond with a 502 error:
I used this to render the HTML:
await page.goto(
data:text/html;base64,${Buffer.from(html).toString('base64')}, {waitUntil: 'networkidle0'
});
I also tried this:
await page.setContent(html);
When I changed the links to HTTP, the HTML rendered as expected.
I wrangled with this for several hours and then moved to chrome-aws-lambda and the issue went away without changing the puppeteer code.