Step 1: Launch the stack - QnABot on AWS

Step 1: Launch the stack

This automated AWS CloudFormation template deploys the QnABot on AWS solution in the AWS Cloud. You must set up an AWS account before launching the stack.

Note

You are responsible for the cost of the AWS services used while running this solution. For more details, see the Cost section in this guide, and reference to the pricing webpage for each AWS service used in this solution.

  1. Sign in to the AWS Management Console and select the button to launch the qnabot-on-aws-main.template AWS CloudFormation template.

    Launch solution button for qnabot-on-aws-main.template

  2. The template launches in the US East (N. Virginia) Region by default. To launch the solution in a different AWS Region, use the Region selector in the console navigation bar.

    Note

    This solution uses Amazon Lex, which is not currently available in all AWS Regions. You must launch this solution in an AWS Region where Amazon Lex is available. For the most current availability by Region, see the AWS Services by Region list.

  3. On the Create stack page, verify that the correct template URL is in the Amazon S3 URL text box and choose Next.

  4. On the Specify stack details page, assign a name to your solution stack. For information about naming character limitations, see IAM and AWS STS quotas in the AWS Identity and Access Management User Guide.

  5. Under Parameters, review the parameters for this solution template and modify them as necessary. This solution uses the following default values.

    Parameter Default Description
    Authentication
    Email <Requires input> Email address for the admin user. This email address will receive a temporary password to access the QnABot on AWS content designer.
    Username <Requires input> This username will be used to sign in to the QnABot on AWS content designer console and client if the client is private.
    PublicorPrivate

    PUBLIC

    Choose whether access to the QnABot on AWS client should be publicly available or restricted to users in the QnABot in the Cognito user pool.
    Language

    English

    The primary language for your QnABot on AWS deployment.

    Note

    Selecting non-English might correspond with limited functionalities.

    Amazon Kendra Integration
    Amazon KendraWebPageIndexId <Optional input> ID of the Amazon Kendra index to use for the web crawler. A custom data source will automatically be added to the specified index.
    Amazon KendraFaqIndexId <Optional input> ID of the Amazon Kendra index to use for syncing OpenSearch questions and answers.
    AltSearchAmazon KendraIndexes <Optional input> A comma separated string value specifying IDs of one or more Amazon Kendra indexes to be used for Amazon Kendra fallback.
    AltSearchAmazon KendraIndexAuth

    FALSE

    Choosing TRUE enables the solution to send an OpenID token to Amazon Kendra index(es) to limit results to which the user is entitled.

    Amazon OpenSearch Service
    OpenSearchInstanceType

    m6g.large.search

    OpenSearch instance type to use for the domain. Default recommendation for production deployments is m6g.large.search. For details, see Supported instance types in Amazon OpenSearch Service in the Amazon OpenSearch Service Developer Guide.

    OpenSearchNodeCount

    4

    Number of nodes in Amazon OpenSearch Service domain. We recommend 4 for fault-tolerant production deployments.
    OpenSearchEBSVolumeSize

    10

    The size in GB of the OpenSearch node instances. 10 is the minimum default volume size.

    OpenSearchDashboardsRetentionMinutes

    43200

    To conserve storage in Amazon OpenSearch Service, metrics and feedback data used to populate the OpenSearch Dashboards are automatically deleted after this period (default 43200 minutes = 30 days). Monitor the free storage space for your OpenSearch Service domain to ensure that you have sufficient space available to store data for the desired retention period.

    OpenSearchFineGrainAccessControl

    TRUE

    Set to FALSE if fine-grained access control does not need to be enabled by default. Once fine-grained access control is enabled, it cannot be disabled. Note that it may take an additional 30-60 minutes for OpenSearch Service to apply these settings to the OpenSearch domain after the stack has been deployed. For details, see Fine-grained access control in Amazon OpenSearch Service in the Amazon OpenSearch Service Developer Guide.

    Amazon LexV2
    LexV2BotLocaleIds

    en_US,es_US,fr_CA

    Languages for QnABot on AWS voice interaction using LexV2. Specify as a comma-separated list of valid locale IDs without empty spaces. For details, see the Supported languages section in the GitHub repository.
    Semantic Search and Embeddings
    EmbeddingsApi

    DISABLED

    Enable QnABot semantics search using embeddings from a pre-trained LLM. If set to SAGEMAKER, an ml.g4dn.xlarge SageMaker endpoint is automatically provisioned with Hugging Face intfloat/e5-large model. Selecting LAMBDA allows for configuration with other models. Disabled by default.

    SagemakerInitialInstanceCount

    1

    Required when EmbeddingsApi is set to SAGEMAKER. Sets the number of instances to deploy. Default instance size is ml.m5.xlarge.

    EmbeddingsLambdaArn <Requires input>

    Required when EmbeddingsApi is set to LAMBDA. Provide the ARN for a Lambda function that takes JSON {"inputtext":"string"}, and returns JSON {"embedding":[...]}.

    EmbeddingsLambdaDimensions

    1536

    Required when EmbeddingsApi is set to LAMBDA. Provides the number of dimensions for embeddings returned from the Lambda function.

    EmbeddingsBedrockModelId

    amazon.titan-embed-text-v1

    Required when EmbeddingsApi is set to BEDROCK. Select the embeddings model from the list of available models. Check account and Region availability and ensure that the model is enabled in the Amazon Bedrock console before deploying. For details, see Model support by AWS Region in the Amazon Bedrock User Guide.

    LLM Integration
    LLMApi

    DISABLED

    Enable question disambiguation and generative responses using an LLM model. If set to SAGEMAKER, a SageMaker endpoint is automatically provisioned. Selecting the LAMBDA option allows for configuration with other LLMs.

    LLMSagemakerInstanceType

    ml.g5.12xlarge

    Required if LLMApi is set to SAGEMAKER. Provide the SageMaker endpoint instance type. Defaults to ml.g5.12xlarge. Check account and Region availability through AWS service quotas before deploying.

    LLMSagemakerInitialInstanceCount

    1

    Required if LLMApi is set to SAGEMAKER. Provide initial instance count. Serverless Inference is not currently available for the built-in LLM model.

    LLMBedrockModelId

    anthropic.claude-instant-v1

    Required when LLMApi is set to BEDROCK. Select the LLM model from the list of available models. Check account and Region availability and ensure that the model is enabled in the Amazon Bedrock console before deploying.

    LLMLambdaArn <Requires input>

    Required if LLMApi is set to LAMBDA. Provide the ARN for a Lambda function that takes JSON {"prompt":"string", "settings":{key:value,..}}, and returns JSON {"generated_text":"string"}.

    BedrockKnowledgeBaseId <Optional input> ID of an existing Amazon Bedrock knowledge base. This setting enables the use of Amazon Bedrock knowledge bases as a fallback mechanism when a match is not found in OpenSearch.
    BedrockKnowledgeBaseModel

    anthropic.claude-instant-v1

    Required if BedrockKnowledgeBaseId is not empty. Sets the preferred LLM model to use with the Amazon Bedrock knowledge base.
    Other parameters
    LexBotVersion

    LexV2 Only

    Amazon Lex version to use for QnABot on AWS. Select LexV2 Only to install QnABot on AWS in AWS Regions where LexV1 is not supported.

    InstallLexResponseBots

    TRUE

    Configures your chatbot to ask questions and process your end user's answers for surveys and quizzes. If the Elicit Response feature is not needed, choose FALSE to skip the installation of the sample Lex response bots. For details, see Configuring the chatbot to ask the questions and use response bots.

    FulfillmentConcurrency

    0

    The amount of provisioned concurrency for the Fulfillment Lambda function. For details, see Configuring reserved concurrency.

    VPCSubnetIdList <Optional input> Set to a comma delimited list of subnet IDs belonging to the target VPC you want to deploy QnABot on AWS in.
    VPCSecurityGroupIdList <Optional input> Set to a comma delimited list of security group IDs used by QnABot when deployed within a VPC.
    XraySetting

    FALSE

    Configure Lambda functions with AWS X-Ray enabled.
  6. Choose Next.

  7. On the Configure stack options page, keep the default settings.

  8. On the Review and create page, review and confirm the settings. Check the box acknowledging that the template might create IAM resources with custom names, and the box acknowledging that AWS CloudFormation might require the CAPABILITY_AUTO_EXPAND capability.

  9. Choose Submit to deploy the stack.

You can view the status of the stack in the AWS CloudFormation console in the Status column. You should receive a CREATE_COMPLETE status in approximately 30-45 minutes.

When the stack deployment is complete, the Output tab displays the following information:

  • ContentDesignerURL – URL to launch the content designer UI

  • ClientURL – URL to launch the end user client webpage

  • DashboardUrl – URL to launch the CloudWatch dashboard for monitoring

  • FeedbackSNSTopic – Topic name to allow feedback notifications

  • LexV1 and LexV2 bot information – Data for configuring integration with contact centers and web clients.

Note

In addition to the primary AWS Lambda functions,this solution includes the solution-helper Lambda function, which runs only during initial configuration or when resources are updated or deleted.

When you run this solution, the solution-helper Lambda function is not regularly active. However, you must not delete it, because it is necessary to manage associated resources.