I have a simple lambda function which returns a response object as expected for passthrough API Gateway and i’m using AWS and NodeJS 8.10. While testing using sls invoke local -f <name> --log, I noticed that Serverless doesn’t output the “response” object.
Is there a way to get this to print without explicitly adding a log statement? I believe it would be very valuable to easily see this while developing.
Which version of the Serverless Framework are you using? Support for async functions when using invoke local is available since version 1.29.0 according to the changelog. Upgrading to a more recent version might help.
Another thing that comes to mind: according to the API Gateway documentation, the body property must be a JSON string when using the Lambda Proxy Integration (which is the case by default for the Serverless Framework). So maybe try this: