Search code examples
aws-lambdaamazon-lex

How is it that the documented intent states in Lex are different from the actual available values?What is the difference between each of these states?


I am currently working on integrating aws Lex with lambda function written in TypeScript and I am facing a situation in which I need help .

Upon reading the aws documentation for LexV2 the following values are available for an intent state:

  • Failed
  • Fulfilled
  • FulfillmentInProgress
  • InProgress
  • ReadyForFulfillment
  • Waiting

However when I used the 'Waiting' value, The following error message showed up :

Invalid Lambda Response: Received invalid response from Lambda: Can not deserialize value of type Intent$IntentState from String "Waiting": value not one of declared Enum instance names: [ReadyForFulfillment, InProgress, Failed, Fulfilled]

Upon this I need help to:

  1. Understand how is it possible to have values that are not recognized.
  2. Understand the difference between each of these values (Note: not all of the accepted values are explained in the documentation)

Solution

  • After reaching out to aws support here is the answer:

    LexV2 doesn't accept "FulfillmentInProgress" or "Waiting" as valid intent state.

    Difference between each of the valid value:

    ReadyForFulfillment - The bot is ready to fulfillment. Passing this state via lambda output will make the bot jump to fulfillment state

    InProgress - The default state

    Fulfilled - The bot will jump to closed state and will play back both the fulfillment success message and closing response

    Failed - Mark the intent as failed; will result in bot playing the fulfillment failure message