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!

asked 2 years ago90 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions