Spotlight
AWS Lambda Functions: Return Response and Continue Executing
A how-to guide using the Node.js Lambda runtime.
Rookout is a SaaS platform that offers a “Live Debugger” service, but there is little information online about how it works with AWS Lambda. So I tried it out and have some good news to report - it does work well with Lambda, though there are some problems.
AWS Lambda, when running “live” in AWS itself, does not support the attachment of debuggers. Because of this, when debugging an AWS Lambda function the normal workflow is either to hope that a function’s logs give you enough clues/hints or to run the code locally and attempt to replicate the issue. Debugging Lambda in this way is doable, but the purpose of Rookout is supposed to be that it makes the debugging process easier and faster.
The Live Debugger allows you to do exactly what Rookout says, which is set breakpoints that do not actually pause the execution of your function but do allow you to debug the function effectively. The Debugger allows you to both see the values of all local variables as well as see the breakpoint’s stack trace in the same way as any other debugger. For example, if I notice that my function is throwing a “list index out of range” then I can use Rookout to understand what this error means.
In the image above, we can see that there is a breakpoint on line 22. The “Variables” section in the bottom right corner shows us that the top_fruits list had a length of zero, which means that that top_fruits was the cause of the error.
In this particular case the stack trace is not important, but it is nice to know that this feature seems to work perfectly and would be useful when debugging a real application.
Rookout says “No connected applications”
My function is erroring 100% of the time but I am not seeing anything in the Rookout UI
Rookout web UI shows stale code when using local filesystem, even after pushing the refresh button in the Rookout page
All of the issues mentioned in this post probably have solutions that would be provided by Rookout support. I did not contact Rookout support because I wanted to truly experience what the first few hours of using Rookout would look like. In the future, if I am working with very complicated codebases running on AWS Lambda, I would be willing to use Rookout because I think its value outweighs the initial difficult parts of using the service.
A how-to guide using the Node.js Lambda runtime.