Since 2 weeks in lost time I try to install Puppeteer on AWS Lambda without success.
I have try: https://github.com/sambaiz/puppeteer-lambda-starter-kit and https://github.com/deathemperor/puppeteer-lambda-starter-kit
My final code is: https://github.com/sambaiz/puppeteer-lambda-starter-kit
Replace index.js: https://github.com/sambaiz/puppeteer-lambda-starter-kit/blob/master/src/index.js
By: https://github.com/deathemperor/puppeteer-lambda-starter-kit/blob/master/src/index.js
Also, i'm on windows 7 so to build the package I remove/change a lot of stuff on the package.json for scripts sections. I have create package with and without babel and lint. Also, I have try with different version of puppeteer and chronium.
Someone suggest me to fix the version of puppeteer to 1.1.1 without success. See( TheCat and cirdes ): https://github.com/GoogleChrome/puppeteer/issues/323
I always get this error on aws:
{
"errorMessage": "Failed to launch chrome! spawn /tmp/headless_shell ENOENT\n\n\nTROUBLESHOOTING: [...]",
"errorType": "Error",
"stackTrace": [
"",
"",
"TROUBLESHOOTING:[..]",
"",
"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)",
"onErrorNT (internal/child_process.js:372:16)",
"_combinedTickCallback (internal/process/next_tick.js:138:11)",
"process._tickDomainCallback (internal/process/next_tick.js:218:9)"
]
}
Config AWS: I use "Upload a file from Amazon S3" option because it always finish by timeout with the UI and same thing for CLI command.
Runtime: Node.js 8.10
Handler: index.handler
Executable role: lambda_basic_execution. I have also try with a custom role who have full access on lambda and S3 just in case.
TimeOut: 30 sec
Memory: 3008 mb.
If someone can guide me a little bit.