正如问题所说,当使用lambda函数作为验证代码挂钩时,我在AWS lex聊天终端上收到500错误。 lambda函数正在使用lex事件进行工作和测试,并且chatbot正在按预期工作,并在不使用lambda函数时返回插槽值。
这是lex
给出的确切错误消息 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>Page Error</title>
<style>
body {
font: 13px/ 1.231 verdana, arial, helvetica, clean, sans-serif;
}
h1,
.h1 {
color: #E47911;
font-size: 170%;
font-weight: normal;
margin: 1.5em 0 1em;
padding: 0;
}
#errorPage {
text-align: center;
margin-top: 44px;
margin-bottom: 57px;
}
#errorPage h1 {
margin: 12px 0;
}
#errorPage p {
line-height: 1.7em;
}
</style>
</head>
<body>
<div id="errorPage"><img src="https://images-na.ssl-images-amazon.com/images/G/01/webservices/console/500._V170950309_.gif" width="392" height="202"
alt="500" />
<h1>We're sorry!</h1>
<p>An error occurred when we tried to process your request. <br /> Rest assured, we're working to resolve the problem as
soon as possible. We apologize for the inconvenience. <br /> <a href="https://aws.amazon.com">Click here to visit our home page</a></p>
</div>
</body>
</html>