AWS LEX 网络 UI 示例

AWS LEX web UI sample

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

按照说明,我能够创建认知池 ID 并保存在聊天机器人-ui-loader-config.json 中,并尝试使用 npm start。服务器启动于 localhost:8000 但我无法 运行 任何一个 bot 命令。

是否有人已经使用示例在 WEB-UI 部分中实现了。我想将我的机器人从 AWS-LEX 导出到任何一台本地服务器。

聊天机器人-ui-加载程序-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"
  }
}

检查浏览器控制台是否有任何错误。当我尝试这个时,它帮助了我。 以下是我在本地尝试之前的一些经历:

应正确设置 IAM 权限,例如 Cognito 池应有权访问 Lex,或者 Polly 应能够访问 Lex。 联合身份与用户池 - 我不得不使用联合身份池。

我遇到了同样的问题。我跟着 this guide 解决了我的问题。

This issue is more related to setting proper permission for Amazon Cognito Pools. It can be checked from browser console as pointed out in the above answer.

以上 link 提供了分步指南。