Having issue while sending lambda response to Lex v2. Error : "Invalid Lambda Response: Can not construct instance of IntentResponse"
I am trying to create a bot in lex v2 console using c# .net function. All are done, in the integration part we have the following error in lex v2 chat window.
we are using custom models for Request and Response. Is there any AWS DLL for this? like LexEvent & LexResponse in lex v1
Invalid Lambda Response: Received invalid response from Lambda: Can not construct instance of IntentResponse, problem: The validated object is null at [Source: {"Jsonvalue"}; line: 1, column: 561]
Response we trying to return is,
{ "SessionId":"125512899102434", "SessionState": { "ActiveContexts":[], "SessionAttributes":{}, "DialogAction": { "SlotToElicit":"Patientid", "Type":"ElicitSlot" }, "Intent": { "ConfirmationState":"None", "Name":"ScheduleAppointment", "Slots": { "MobileNumber":null, "Department":null, "FirstName":null, "Patientid":null, "Time":null, "LastName":null, "Gender":null, "Doctor":null, "UserType":null, "Date":null, "Age":null, "Location":null }, "State":"InProgress" } }, "Messages": [ { "ContentType":"PlainText", "Content":"Please provide your Patient ID" } ] }
Please help us to resolve this issue and move forward. thanks, Mohan
Hi Mohan,
Thanks for reaching out. Amazon Lex V2 expects a response from your Lambda function in the following format: https://docs.aws.amazon.com/lexv2/latest/dg/lambda.html#lambda-response-format
Please note that response JSON keys are case sensitive.
Thanks,
Relevant questions
Lambda function to query Kendra for Lex Response
asked 5 months agoHow to send delay response from lambda function to aws lex bot?
asked 4 months agoIs there a way to grab a user's voice utterance from an Amazon Lex V2 bot using Lambda calls?
asked 3 months agoHaving issue while sending lambda response to Lex v2. Error : "Invalid Lambda Response: Can not construct instance of IntentResponse"
asked 4 months agoImport Bot Error in Lex V2
asked a day agoAmazon Lex V2: How to identify slack user-id in lambda connected to Amazon Lex v2 bot
asked a month agoAWS Lex V2 Closing Response not working
asked 6 months ago[Issue] Lambda LexEvent returns "null" values from Lex v2 Request
asked 5 months agoV2 Lex Order Flowers Lambda error
asked 2 months agoV2 Lex OrderFlowers Blueprint Lambda Error
asked 2 months ago