- Newest
- Most votes
- Most comments
The behavior you're experiencing is likely related to how Amazon Lex V2 handles fulfillment updates and timeouts in different interaction modes. When using the "test" button in the AWS console web UI for Lex, you're likely using a non-streaming conversation mode, which behaves differently from streaming conversations.
In non-streaming conversations, such as when using the RecognizeText or RecognizeUtterance operations (which the test chat likely uses), the start response and update messages are not returned. These messages are typically only used in streaming conversations initiated with the StartConversation operation.
The default timeout for non-streaming conversations is usually around 8-10 seconds. If your Lambda function takes longer than this to complete, Lex will time out and return a default message, which explains why you're seeing "IntentX is fulfilled" after about 10 seconds.
To address this issue, you have a few options:
-
Optimize your Lambda function to complete within the timeout period (around 8-10 seconds).
-
If possible, test your bot using a streaming conversation mode, which would allow you to see the start and update responses.
-
Configure a post-fulfillment response in your Lex bot. This response is played back for both streaming and non-streaming conversations and can provide a more informative message when the Lambda function times out.
-
If you need longer processing times, consider implementing an asynchronous pattern where the Lambda function quickly acknowledges the request and then continues processing in the background, possibly updating the user through a different channel.
Remember that the behavior you're seeing in the test chat may not necessarily reflect how your bot will behave in a production environment, especially if you're planning to use streaming conversations.
In case if you still observe any issues, then we need some non-public details. Please use the following link to open a support case with the AWS Support team for further investigation: https://console.aws.amazon.com/support/home#/case/create
Sources
Configuring fulfillment progress updates for your Lex V2 bot - Amazon Lex
Invoke dialog code hook - Amazon Lex
Relevant content
- asked 3 years ago
- asked 2 years ago
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 4 years ago
