Skip to content

Conversation

otterley
Copy link

@otterley otterley commented Feb 2, 2022

Update the example provided in the main README file. In this update, we preserve the browser object across Lambda function invocations, reducing latency by several hundred milliseconds per execution that would otherwise be spent re-loading and starting the browser executable.

The updated example also updates the handler function call signature and eliminates unnecessary exception handling. Finally, we return the value instead of invoking the callback as per the Lambda function handler documentation for Node.js:

For async handlers, you return a response, error, or promise to the runtime instead of using callback.

@gerwin-so
Copy link

There is an issue with this approach though, and a workaround seems to be to always keep a page open: #217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants