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.
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: