I’ve been struggling for about 2 weeks trying to get Puppeteer working in AWS Lambda but keep running into issues.
I’ve tested multiple approaches and starter kits but none seem to work. I’m working on Windows 7 and had to modify the package.json scripts section to get the build working properly. I’ve experimented with different Puppeteer versions and Chromium builds, including trying version 1.1.1 as suggested by other developers.
The main error I keep getting is:
{
"errorMessage": "Failed to launch chrome! spawn /tmp/browser_shell ENOENT\n\n\nTROUBLESHOting: [...]",
"errorType": "Error",
"stackTrace": [
"",
"onClose (/var/task/node_modules/puppeteer/lib/Launcher.js:299:14)",
"ChildProcess.helper.addEventListener.error (/var/task/node_modules/puppeteer/lib/Launcher.js:290:64)",
"emitOne (events.js:116:13)",
"ChildProcess.emit (events.js:211:7)",
"Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)"
]
}
My Lambda configuration:
- Runtime: Node.js 8.10
- Handler: index.handler
- Role: lambda_basic_execution (also tried custom role with full Lambda and S3 access)
- Timeout: 30 seconds
- Memory: 3008 MB
- Deploy method: S3 upload (UI and CLI both timeout)
Has anyone successfully deployed Puppeteer on Lambda and can share some guidance on what might be going wrong?