0

I am trying to build a chatbot using Lex but I have hit a roadblock and I am stuck here since two days.

When I am tesing in lambda function it works fine with test events but when testing it in lex getting error as below:

lex console

This is how I am calling from lambda function:

lambda function

Any help what I am doing wrong here?

sas
  • 1
  • 3
    Hi, welcome to StackOverflow. Please do not post images of code or errors. Always post them as text, [properly formatted](https://stackoverflow.com/help/formatting). You can edit your original question and update it with the relevant information. Please also read the [How to ask a good question](https://stackoverflow.com/help/how-to-ask) guide. – Jens Aug 23 '21 at 07:53

1 Answers1

0

The format of your response is incorrect. Please check the below sample for how it should look: -

return{
        "dialogAction": {
            "type": "Close",
            "fulfillmentState": "Fulfilled",
            "message": {
                "contentType": "PlainText",
                "content": "My text here"
            }
        }
    }

Also, refer to the AWS Lex documentation for a full view of the input and output formats. AWS Lex Input Event and Response Format

Reegz
  • 511
  • 1
  • 6
  • 13