JSON input in Amazon Lex test console

0

I'm beginner of AWS. I've made a small test function in Lambda. I want to test it in Lex bot. The Lambda function's in put JSON should look like "{ "messageVersion": "1.0", "invocationSource": "FulfillmentCodeHook", "userId": "John", "sessionAttributes": {}, "bot": { "name": "OrderFlowers", "alias": "$LATEST", "version": "$LATEST" }, "outputDialogMode": "Text", "currentIntent": { "name": "LocateCity", "slots": { "City": "Tianjin" }, "confirmationStatus": "None" } }" I've tested it in Lambda test tool and I've got expected response. But in the bot test console, the input JSON is like { "botAliasId": "TSTALIASID", "botId": "UZEZI19JLY", "localeId": "en_US", "text": "hi", "sessionId": "587464913703324" } So I've got error like "Invalid Lambda Response: Received error response from Lambda: Unhandled". I think it is very obvious issue, but I can't find anyone talking about it. What should I do?

Thanks, Andy

  • Hi Andy, thanks for reaching out. You may find Using an AWS Lambda function page useful in debugging your issue. Lex expects a response from your Lambda function in a certain format. Thanks!

已提問 2 年前檢視次數 90 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南