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, refer to the Cost section in this guide, and reference to the pricing webpage for each AWS service used in this solution.

  1. Log in to the AWS Management Console and select the Launch solution 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 services that are 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, refer to 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, refer to IAM and STS Limits 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.

    Note

    Only set LexBotVersion to LexV2 Only when deploying in an AWS Region where LexV1 is not supported.

    Parameter Default Description
    Authentication
    Email <Requires input> 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 QnABot on AWS content designer console.
    PublicorPrivate

    PUBLIC

    Choose whether access to the QnABot on AWS client should be publicly available or restricted to users in the QnABot on AWS UserPool.
    Amazon Kendra Integration
    DefaultAmazon KendraIndexid Optional input Index ID of an existing Amazon Kendra index, used as the default index for QnABot on AWS Amazon Kendra integration. You can use the QnABot on AWS content designer to reconfigure the Amazon Kendra index settings at any time.
    Amazon OpenSearch Service
    Amazon OpenSearch ServiceNodeCount

    4

    Number of nodes in Amazon OpenSearch Service domain. 4 is recommended for fault tolerant production deployments.
    ElasticSearchEBSVolumeSize 10 The size in GB of the OpenSearch node instances.
    Encryption

    ENCRYPTED

    Allows encryption at rest for S3 and Amazon OpenSearch Service, and provisions m6g.large.Amazon OpenSearch Service instances — recommended for production environments. Selecting the UNENCRYPTED configuration provisions lower cost t3.small.Amazon OpenSearch Service instances.
    KibanaDashboardRetentionMinutes

    43200

    To conserve storage in Amazon OpenSearch Service, metrics and feedback data used to populate the Kibana dashboard are automatically deleted after this period (default 43200 minutes = 30 days). Monitor the free storage space for your Amazon OpenSearch Service domain to ensure that you have sufficient space available to store data for the desired retention period.
    Amazon LexV2
    LexV2BotLocaleIds <Requires input> Languages for QnABot on AWS voice interaction using LexV2. Specify a comma separated list of valid locale IDs. For example: en_US, es_US, fr_CA. For more information refer to Languages and locales supported by Amazon Lex.
    Semantic Search and Embeddings
    EmbeddingsApi DISABLED Enable semantic search capability using a pre-trained model. Selecting the SAGEMAKER automatically provisions a Sagemaker endpoint. Selecting the LAMBDA option allows for configuration with other models.
    SagemakerInitialInstanceCount 1 Required for SAGEMAKER EmbeddingsApi types. Sets the number of instances to deploy. Set to 0 for serverless inference.
    EmbeddingsLambdaArn <Requires input> Required for LAMBDA EmbeddingsApi types. The ARN of the Lambda function that calls the LLM model.
    EmbeddingsLambdaDimensions 4096 Required for LAMBDA EmbeddingsApi types. Provides the number of dimensions for embeddings returned from the Lambda function.
    LLM Integration
    LLMApi DISABLED Enable question disambiguation and generative responses using an LLM model. Selecting the SAGEMAKER automatically provisions a Sagemaker endpoint with LLM model. Selecting the LAMBDA option allows for configuration with other LLM’s.
    LLMSagemakerInstanceType ml.g5.12xlarge Required for SAGEMAKER LLMApi types. Check account and region availability through the Service Quotas service before deploying.
    LLMSagemakerInstanceCount 1 Required for SAGEMAKER LLMApi types. Sets the number of instances to deploy.
    LLMLambdaArn <Requires input> Required for LAMBDA LLMApi types. The ARN of the Lambda function that calls the LLM model.
    Other parameters
    LexBotVersion

    LexV1 or LexV2

    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 Required for using the elicit response feature.
    FulfillmentConcurrency 0 The provisioned concurrency for the fulfillment Lambda function.
    XraySetting False Configure Lambdas with X-Ray enabled.
  6. Choose Next.

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

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

  9. Choose Create stack 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, web clients, and so on.

Note

In addition to the primary AWS Lambda function 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, you will notice both Lambda functions in the AWS console, only the function is regularly active. However, you must not delete the solution-helper function, as it is necessary to manage associated resources.