diff --git a/index.html b/index.html index ca9224e..500f107 100644 --- a/index.html +++ b/index.html @@ -1,1470 +1 @@ - - - - - - - -Amazon Lex chatbot with Amazon Kendra on the AWS Cloud - - - - - -
-
-
-

Amazon Lex chatbot with Amazon Kendra on the AWS Cloud

-

Quick Start Reference Deployment

-
-
-QS -
-
-
-

September 2020
-Sanchit Jain, Quantiphi
-Shivansh Singh, Solutions Architect, AWS

-
-
- - - - - -
- - -Visit our GitHub repository for source files and to post feedback, -report bugs, or submit feature ideas for this Quick Start. -
-
-
-

This Quick Start was created by Quantiphi in collaboration with Amazon Web Services (AWS). Quick Starts are automated reference deployments that use AWS CloudFormation templates to deploy key technologies on AWS, following AWS best practices.

-
-
-
-
-

Overview

-
-
-

This Quick Start reference deployment guide provides step-by-step instructions for deploying Amazon Lex chatbot with Amazon Kendra on the AWS Cloud.

-
-
-

This Quick Start sets up an Amazon Kendra index along with a data source that uses an Amazon Simple Storage Service (Amazon S3) bucket as the document repository, and then integrates them with an Amazon Lex chatbot. Organizations can use this Quick Start to enhance the search and fulfillment capabilities of their Amazon Lex chatbot by letting users query the enterprise data repository using Amazon Kendra.

-
-
- - - - - -
- - -Amazon may share user-deployment information with the AWS Partner that collaborated with AWS on the Quick Start. -
-
-
-
-
-

Amazon Lex chatbot with Amazon Kendra on AWS

-
-
-

This Quick Start lets third-party products integrate with Amazon Lex and Amazon Kendra to provide answers to user questions that originate from a document search interface.

-
-
-

This Quick Start creates an Amazon Lex chatbot with an Amazon Kendra index. The index is linked to an Amazon S3 bucket data repository, which contains a sample FAQ document for testing. The Amazon Lex chatbot is connected to the Amazon Kendra index via the Amazon Kendra search intent.

-
-
-
-
-

AWS costs

-
-
-

You are responsible for the cost of the AWS services and any third-party licenses used while running this Quick Start. There is no additional cost for -using the Quick Start.

-
-
-

The AWS CloudFormation templates for Quick Starts include -configuration parameters that you can customize. Some of the settings, -such as the instance type, affect the cost of deployment. For cost estimates, -see the pricing pages for each AWS service you use. Prices are subject to change.

-
-
- - - - - -
- - -After you deploy the Quick Start, create AWS Cost and Usage Reports to deliver billing metrics to an Amazon Simple Storage Service (Amazon S3) bucket in your account. These reports provide cost estimates based on usage throughout each month and aggregate the data at the end of the month. For more information, see What are AWS Cost and Usage Reports? -
-
-
-
-
-

Software licenses

-
-
-

This Quick Start does not require a license to deploy Amazon Lex chatbot with Amazon Kendra.

-
-
-
-
-

Architecture

-
-
-

Deploying this Quick Start with default parameters builds the following Amazon Lex chatbot with Amazon Kendra environment in the AWS Cloud.

-
-
-
-Architecture -
-
Figure 1. Quick Start architecture for Amazon Lex chatbot with Amazon Kendra on AWS
-
-
-

As shown in Figure 1, the Quick Start sets up the following:

-
-
-
    -
  • -

    An Amazon Lex chatbot with associated intents for sending search queries to Amazon Kendra.

    -
  • -
  • -

    An Amazon Kendra index for providing search results.

    -
  • -
  • -

    An Amazon S3 bucket used as the data source.

    -
  • -
  • -

    An AWS Lambda function used to query the Amazon Kendra index and return the appropriate response.

    -
  • -
  • -

    AWS Identity and Access Management (IAM) roles for the Amazon Lex chatbot, and a Lambda function with the necessary permissions to access AWS services and resources.

    -
  • -
-
-
-
-
-

Planning the deployment

-
-
-

Specialized knowledge

-
-

This deployment requires a moderate level of familiarity with -AWS services. If you’re new to AWS, see Getting Started Resource Center -and AWS Training and Certification. These sites provide materials for learning how to design, -deploy, and operate your infrastructure and applications on the AWS Cloud.

-
-
-

This Quick Start assumes familiarity with AWS CloudFormation, AWS Lambda, Amazon Lex, Amazon S3, and Amazon Kendra.

-
-
-
-

AWS account

-
-

If you don’t already have an AWS account, create one at https://aws.amazon.com by following the on-screen instructions. Part of the sign-up process involves receiving a phone call and entering a PIN using the phone keypad.

-
-
-

Your AWS account is automatically signed up for all AWS services. You are charged only for the services you use.

-
-
-
-

Technical requirements

-
-

Before you launch the Quick Start, review the following information and ensure that your account is properly configured. Otherwise, deployment might fail.

-
-
-

Resource quotas

-
-

If necessary, request service quota increases for the following resources. You might need to request increases if your existing deployment currently uses these resources and if this Quick Start deployment could result in exceeding the default quotas. The Service Quotas console displays your usage and quotas for some aspects of some services. For more information, see What is Service Quotas? and AWS service quotas.

-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ResourceThis deployment uses

AWS Identity and Access Management (IAM) roles

4

AWS Lambda

4

Amazon S3 bucket

2

Amazon Lex Chatbot

1

Amazon Kendra Index

1

Kendra Data source

1

Kendra FAQ

1

-
-
-

Supported AWS Regions

-
-

For any Quick Start to work in a Region other than its default Region, all the services it deploys must be supported in that Region. You can launch a Quick Start in any Region and see if it works. If you get an error such as “Unrecognized resource type,” the Quick Start is not supported in that Region.

-
-
-

For an up-to-date list of AWS Regions and the AWS services they support, see AWS Regional Services.

-
-
- - - - - -
- - -Certain Regions are available on an opt-in basis. For more information, see Managing AWS Regions. -
-
-
-
-

IAM permissions

-
-

Before launching the Quick Start, you must sign in to the AWS Management Console with IAM permissions for the resources that the templates deploy. The AdministratorAccess managed policy within IAM provides sufficient permissions, although your organization may choose to use a custom policy with more restrictions. For more information, see AWS managed policies for job functions.

-
-
-
-

Deployment options

-
-

This Quick Start provides a single deployment option that builds a new AWS environment consisting of the Amazon Lex chatbot, AWS Lambda functions, an Amazon Kendra index, an Amazon S3 data source, a sample FAQ file, and other infrastructure components.

-
-
-
-

Prepare for the deployment

-
-

Before launching the CloudFormation templates and deploying the Quick Start, be sure that you have an Amazon S3 bucket in place. This S3 bucket should contain the documents that you want to be indexed by Amazon Kendra to provide answers to user questions. This S3 bucket is your document repository for the Lex chatbot, and is used as a data source by Amazon Kendra. You can bring your own S3 bucket or use Quantiphi’s S3 bucket (s3://quickstart-quantiphi-lex-kendra/) with sample documents as an example.

-
-
-

The Quick Start repository contains a sample FAQ file that you can upload to the S3 bucket and use for testing after you deploy the Quick Start. See Test the deployment for more information.

-
-
-
-
-
-
-

Deployment steps

-
-
-

Sign in to your AWS account

-
-
    -
  1. -

    Sign in to your AWS account at https://aws.amazon.com with an IAM user role that has the necessary permissions. For details, see Planning the deployment earlier in this guide.

    -
  2. -
  3. -

    Make sure that your AWS account is configured correctly, as discussed in the Technical requirements section.

    -
  4. -
-
-
-
-

Launch the Quick Start

-
- - - - - -
- - -You are responsible for the cost of the AWS services used while running this Quick Start reference deployment. There is no additional cost for using this Quick Start. For full details, see the pricing pages for each AWS service used by this Quick Start. Prices are subject to change. -
-
-
-
    -
  1. -

    Sign in to your AWS account, and launch the following AWS CloudFormation template.

    -
  2. -
-
- --- - - - - - -

Deploy Amazon Lex chatbot with Amazon Kendra on AWS

-
-

The deployment takes about 25 minutes to complete.

-
-
-
    -
  1. -

    Check the AWS Region that’s displayed in the upper-right corner of the navigation bar, and change it if necessary. This is where the network infrastructure for Amazon Lex chatbot with Amazon Kendra is built. The template is launched in the us-east-1 Region by default.

    -
  2. -
-
-
-
    -
  1. -

    On the Create stack page, keep the default setting for the template URL, and then choose Next.

    -
  2. -
  3. -

    On the Specify stack details page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary.

    -
  4. -
-
-
-

+ -In the following tables, parameters are listed by category and described separately for the deployment options. When you finish reviewing and customizing the parameters, choose Next.

-
-
-

+ -NOTE: Unless you are customizing the Quick Start templates for your own deployment projects, keep the default settings for the parameters Quick Start S3 bucket name, Quick Start S3 bucket Region, and Quick Start S3 key prefix. Changing these settings automatically updates code references to point to a new Quick Start location. For more information, see the AWS Quick Start Contributor’s Guide.

-
-
-

+

-
-
-
-

Parameters for launching stack creation

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table 1. Kendra resource configuration
Parameter label (name)Default valueDescription

Kendra index name -(KendraIndexName)

Lex-Kendra-Bot-Index

The name of the Kendra index.

Kendra index edition -(KendraIndexEdition)

DEVELOPER_EDITION

Kendra index edition (DEVELOPER_EDITION or ENTERPRISE_EDITION).

S3 bucket with documents -(KendraS3BucketName)

Requires input

The name of the S3 bucket the contains the Kendra docs for syncing.

Data source name for Kendra index -(KendraDataSourceName)

lex-kendra-bot-data-source

The name of data source for the Kendra index.

FAQ name for Kendra -(KendraFAQName)

lex-kendra-bot-faqs

The name of FAQs for the Kendra index.

S3 key for FAQs -(KendraFAQFileKey)

COVID_FAQ.csv

The file where FAQs are stored for the Kendra index.

- - ----- - - - - - - - - - - - - - - -
Table 2. Lex bot configuration
Parameter label (name)Default valueDescription

S3 key of JSON configuration of the Lex bot -(LexBotJSONKey)

assets/lex-bot-template/covid_bot_Export.json

JSON configuration of the Lex bot.

- - ----- - - - - - - - - - - - - - - - - - - - -
Table 3. Cross account role configuration
Parameter label (name)Default valueDescription

Assuming account ID -(AssumingAccountID)

Requires input

Account ID of the AWS account that assumes the IAM role to invoke Lex chatbot.

Organization’s ID -(ExternalID)

Requires input

The organization’s ID.

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - -
Table 4. AWS Quick Start configuration
Parameter label (name)Default valueDescription

Your configured S3 bucket for the Quick Start -(QSS3BucketName)

aws-quickstart

The S3 bucket created for your copy of Quick Start assets.

Region of Quick Start bucket -(QSS3BucketRegion)

us-east-1

The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted.

S3 prefix where you want to sync the Git repo -(QSS3KeyPrefix)

quickstart-quantiphi-lex-kendra-backend/

The S3 key name prefix used for your copy of Quick Start assets.

-
-

+ -. On the Configure stack options page, you can specify tags (key-value pairs) for resources in your stack and set advanced options. When you finish, choose Next. -. On the Review page, review and confirm the template settings. Under Capabilities, select the two check boxes to acknowledge that the template creates IAM resources and might require the ability to automatically expand macros. -. Choose Create stack to deploy the stack. -. Monitor the status of the stack. When the status is CREATE_COMPLETE, the Amazon Lex chatbot with Amazon Kendra deployment is ready. -. To view the created resources, see the values displayed in the Outputs tab for the stack.

-
-
-
-
-
-

Test the deployment

-
-
-

To test the deployment using Quantiphi’s S3 bucket with the sample documents, perform these steps:

-
-
-
    -
  1. -

    Go to the Amazon Lex console, find the bot named self_service_lex_bot, and choose Test Chatbot to start the conversation.

    -
  2. -
  3. -

    Test the Amazon Lex chatbot intents by typing ‘Hi’. You should receive the following response: ‘Amazon Lex: Hello! I am the COVID-19 Rapid Response Bot! You can ask me questions related to COVID-19. As a disclaimer, I’m not responsible for providing professional medical advice, diagnosis or treatment. If you are experiencing life threatening emergency, please call 911. How can I help?’

    -
  4. -
  5. -

    Test the Amazon Kendra search capabilities and connection with Amazon Lex by typing ‘What preventive measures can I take?’. You should receive the following response: On searching the Enterprise repository, I have found the following answer in the FAQs. Wash your hands often, avoid close contact with people and cover your mouth and nose with a cloth face cover when around people, monitor your health, clean and disinfect frequently touched surfaces daily.’

    -
  6. -
-
-
-
-
-

Other useful information

-
-
-

You can use a custom user interface or third-party product as a front end for users to interact with and submit questions. As a back end, use the Amazon Lex chatbot that is deployed with this Quick Start to connect with Amazon Kendra to answer user questions.

-
-
-
-
-

FAQ

-
-
-

Q. I encountered a CREATE_FAILED error when I launched the Quick Start.

-
-
-

A. If AWS CloudFormation fails to create the stack, relaunch the template with Rollback on failure set to No. This setting is under Advanced in the AWS CloudFormation console on the Options page.

-
-
- - - - - -
- - -When you set Rollback on failure to Disabled, you continue to incur AWS charges for this stack. Please make sure to delete the stack when you finish troubleshooting. -
-
-
-

For additional information, see Troubleshooting AWS CloudFormation on the AWS website.

-
-
-

Q. I encountered a size limitation error when I deployed the AWS CloudFormation templates.

-
-
-

A. Launch the Quick Start templates from the links in this guide or from another S3 bucket. If you deploy the templates from a local copy on your computer or from a location other than an S3 bucket, you might encounter template size limitations. For more information about AWS CloudFormation quotas, see the AWS documentation.

-
-
-
-
-

Customer responsibility

-
-
-

After you successfully deploy this Quick Start, confirm that your resources and services are updated and configured — including any required patches — to meet your security and other needs. For more information, see the AWS Shared Responsibility Model.

-
-
-
-
-

Send us feedback

-
-
-

To post feedback, submit feature ideas, or report bugs, use the Issues section of the GitHub repository for this Quick Start. To submit code, see the Quick Start Contributor’s Guide.

-
-
-
-
-

Quick Start reference deployments

-
- -
-
-
-

GitHub repository

-
-
-

Visit our GitHub repository to download -the templates and scripts for this Quick Start, to post your comments, -and to share your customizations with others.

-
-
-
-
-
-

Notices

-
-
-

This document is provided for informational purposes only. It represents AWS’s current product offerings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS’s products or services, each of which is provided “as is” without warranty of any kind, whether expressed or implied. This document does not create any warranties, representations, contractual commitments, conditions, or assurances from AWS, its affiliates, suppliers, or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.

-
-
-

The software included with this paper is licensed under the Apache License, version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the accompanying "license" file. This code is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied. See the License for specific language governing permissions and limitations.

-
-
-
-
- - - - +<\!DOCTYPE html> Redirecting to https://aws-ia.github.io/cfn-ps-quantiphi-lex-kendra-backend/