Search code examples
amazon-web-servicesaws-lambdaaws-lex

Is is possible to capture Amazon Lex's prompts in lambda?


I'm interested in logging the entirety of the conversation between my users and the Lex bot.

Currently, I can capture the user's responses using the validation/fulfillment lambda, but how can I capture the prompts that Lex gives to the user?


Solution

  • You either need to:

    (A) set up a proxy between Lex and the output channels to capture what Lex delivers to the user. Use Amazon Lex PostText API in the proxy to send and receive with Lex, then build your own channel connections with the proxy too.

    Or

    (B) build all of your response messages in Lambda and force Lex to use them, but this means you don't use Delegate nor the Lex Console prompts (even though you'll need prompts written in the console).