Search code examples
node.jsaws-lambdaamazon-lex

AWS LEX web UI sample


enter image description hereI am trying to run the sample AWS-Lex-Web-UI from the https://github.com/awslabs/aws-lex-web-ui#sample-site

As per the directions i am able to create the cognito pool id and also saved in the chatbot-ui-loader-config.json and tried with npm start. Server started at localhost:8000 but i am not able to run any one of the bot command.

Does anybody already implemented in the WEB-UI part using the sample example. I want to export my bot from AWS-LEX to any one of the local server.

chatbot-ui-loader-config.json:

{
  "cognito": {
    "poolId": "us-east-1:b3bxxxx-xxxx-45c7-xxxx-9xxxxxxxx"
  },
  "lex": {
    "botName": "DataBot",
    "initialText": "You can ask me for help rendering a file. Just type \"Render File\" or click on the mic and say it.",
    "initialSpeechInstruction": "Say 'Render a file' to get started."
  },
  "polly": {
    "voiceId": "Salli"
  },
  "ui": {
    "parentOrigin": "",
    "toolbarTitle": "File Processor"
  },
  "recorder": {
    "preset": "speech_recognition"
  }
}

Solution

  • Checkout the browser console for any errors. It helped me while I was trying this one out. Here are some of the things that I experienced before I was able to try this out locally:

    IAM permissions should be properly set such as cognito pools should have access to the Lex or that Polly should be able to access Lex. Federated identities versus User Pools - I had to use Federated Identity pool.