Unable to run basic lambda example
See original GitHub issueExample code: https://github.com/elie222/examples-1/tree/fix/aws-node-puppeteer-local/aws-node-puppeteer
This works locally:
serverless offline
# Then go to: http://localhost:3000/?url=https://google.com
But running:
serverless deploy
# Then go to: https://lambdaurl/?url=https://google.com
Gives this error:
{
"message": "Internal server error"
}
And in the CloudWatch logs:
{
"errorType": "Error",
"errorMessage": "Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs.",
"stack": [
"Error: Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs.",
" at /var/task/node_modules/@serverless-chrome/lambda/dist/bundle.cjs.js:376:13",
" at Generator.throw (<anonymous>)",
" at step (/var/task/node_modules/@serverless-chrome/lambda/dist/bundle.cjs.js:311:193)",
" at /var/task/node_modules/@serverless-chrome/lambda/dist/bundle.cjs.js:311:404",
" at processTicksAndRejections (internal/process/task_queues.js:93:5)"
]
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Troubleshoot execution issues in Lambda - AWS Documentation
Errors can occur during function initialization, when your handler code processes the event, or when your function returns (or fails to return) a...
Read more >Unable to run lambda · Issue #377 · localstack ... - GitHub
Hello, I tried to run a simple example of lambda function like this one : exports.handler = function(event, context) { console.log('hello'); } ...
Read more >How do I resolve the "Unable to import module ... - YouTube
... Knowledge Center article with this video: https://aws.amazon.com/premiumsupport/knowledge-center/ lambda -import-module-error-python/0...
Read more >AWS lambda unable to create a scheduled event source
The lambda is running with basic lambda execution role. UPDATE. I temporarily gave the role under which the Lambda is executing admin access,...
Read more >Amazon Lambda function errors in Python - 亚马逊云科技
This error is a result of using the Amazon Command Line Interface (Amazon CLI) to upload a deployment package that contains a C...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After hours of frustration, used
https://github.com/alixaxel/chrome-aws-lambda
and it worked without an issue!The reason why my PR works is because the lambda runtime is continually being updated to newer and newer versions of the Amazon Linux AMI. The dependencies have significantly changed since the most recent release and need some tweaking in order to get right.