Store the HTML markup in a variable and return it to avoid the text being wrapped in quotes. First store your HTML markup in a variable in the lambda function then return it. For example in Node.js:
context.succeed({ variableHTML: myContentHtml })
Here is an example of the mapping template:
#set($inputRoot = $input.path('$'))
$inputRoot.variableHTML .
Here variableHTML
contains the HTML markup passed from the lambda function. After that you needed to create an Response model for HTTP Status, which is accessible through Method Response. Here set the Response model Content-Type as text/html. Then you'll get the HTML page without quotes and the browser recognizes it as HTML.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…