Store the HTML markup in a variable in the lambda function and then return it. So, in Node.js it is like this:
context.succeed({ variableHTML: myContentHtml })
This is an example of a mapping template:
#set($inputRoot = $input.path('$'))
$inputRoot.variableHTML .
As you see variableHTML is the variable which contains the HTML markup passed from the lambda function. You need to create a Response model for the HTTP status. Set your Response model Content-Type as text/html. This will give you the HTML code without quotes so that the browser can recognize it as HTML.