One more thing about debugging these things, note that you’re just using the serverless framework to control things in AWS, which you’ll normally have to setup by yourself.
In other words, you can view all the things serverless has done for you in the AWS console!
For example let see what the template thing is doing to the API Gateway:
- Login to AWS console and go to API Gateway.
- On the left sidebar select the API you want to view under the APIs section (which should be the “stage DASH service” in you
serverless.yml). - You’ll see the API path and method on the right, select the method you want to view. In your case, it’s the
GETunder/hello - Now there are 4 boxes, for the request template click on the top right Integration Request (and response template is the bottom right Integration Response)
- Scroll down and click on the Body Mapping Templates, you should see all the templates you defined for the response template (plus some more default ones such as
application/x-www-form-urlencoded). In your case you should see aapplication/json. Select the template to view the template, forapplication/json, the content should be a valid JSON string.