Better Lambda Logging/Debugging

After some effort I was able to debug the problem and get the lambda working as expected. It would still be nice to have a better way to diagnose problems, and I would appreciate any input on if I am going about this type of thing correctly.