Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example usage #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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.

@gkramer245
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.

None yet

2 participants