Skip to content

Commit

Permalink
Merge pull request #744 from aws-solutions/feature/v6.0.1
Browse files Browse the repository at this point in the history
Feature/v6.0.1
  • Loading branch information
jangidms authored Jun 26, 2024
2 parents 94a793a + 2d20c4b commit 7b37073
Show file tree
Hide file tree
Showing 71 changed files with 682 additions and 270 deletions.
22 changes: 16 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.0.1] - 2024-06-26
### Fixed
- Fixed bug that was restricting stack names to be below 26 characters. [Issue #741](https://github.com/aws-solutions/qnabot-on-aws/issues/741)
- Fixed a looping issue when using slots and chaining #721 ([PR #721](https://github.com/aws-solutions/qnabot-on-aws/pull/721)) - contributed by ([@amendlik](https://github.com/amendlik))
- Github links with incorrect paths.

### Updated
- Security patches for braces, urllib3, and ws.
- Improved latency of IAM policy propagation when switching the Bedrock embedding model.

## [6.0.0] - 2024-06-07
### Added
- Integration with Amazon Bedrock
Expand All @@ -30,7 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Kendra Webcrawler will now create data source in the native language if supported by Kendra. Kendra can now query in different languages. ([issue #713](https://github.com/aws-solutions/qnabot-on-aws/issues/713))
- Standardized folder structure
- Made logging enhancements for Amazon OpenSearch Service and Amazon Data Firehose
- Added case conversion handlebars helpers([PRs #719](https://github.com/aws-solutions/qnabot-on-aws/pull/719)) - contributed by ([@amendlik](https://github.com/amendlik))
- Added case conversion handlebars helpers([PR #719](https://github.com/aws-solutions/qnabot-on-aws/pull/719)) - contributed by ([@amendlik](https://github.com/amendlik))
- Consolidated common AWS SDK dependencies to reduce overall solution artifact size and lambdas deployment package size
- Patched security vulnerabilities and and integrated with CloudFormation Guard evaluation tool
- Added ability to TestAll in a selected locale, the locales to be tested should be defined in the template parameter `LexV2BotLocaleIds`
Expand Down Expand Up @@ -320,12 +330,12 @@ __*Note: we recommend that you first deploy these changes in a non-production en

### Added

- Intent and Slot matching (an early implementation). This new capability supports creating dedicated custom Intents for a QnABot {Item ID}. You can extend QnABot to support one or more related intents. For example, you might create an intent that makes a car reservation, or assists an agent during a live chat or call (via Amazon Connect). More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/intent_slot_matching/README.md
- Support for using custom domain names for QnABot Designer and Client interfaces. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/custom_domain_name_setup/README.md
- AWS QnABot Command Line Interface (CLI) - the AWS QnABot CLI supports the capability to import and export questions and answers via command line. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/qnabot_cli/README.md
- Kendra Redirect - with the Kendra Redirect feature, you can now include a Kendra query within a Item ID. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/kendra_redirect/README.md
- Intent and Slot matching (an early implementation). This new capability supports creating dedicated custom Intents for a QnABot {Item ID}. You can extend QnABot to support one or more related intents. For example, you might create an intent that makes a car reservation, or assists an agent during a live chat or call (via Amazon Connect). More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/v5.2.0/docs/intent_slot_matching/README.md
- Support for using custom domain names for QnABot Designer and Client interfaces. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/v5.2.0/docs/custom_domain_name_setup/README.md
- AWS QnABot Command Line Interface (CLI) - the AWS QnABot CLI supports the capability to import and export questions and answers via command line. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/v5.2.0/docs/qnabot_cli.md
- Kendra Redirect - with the Kendra Redirect feature, you can now include a Kendra query within a Item ID. More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/v5.2.0/docs/kendra_redirect/README.md
- Integration with Canvas LMS (an early example implementation). Students use their schools' learning management system (LMS) to keep track of their assignments, grades, and their course work. With this integration, students will be able to ask QnABot about their grades, syllabus, enrollments, assignments, and announcements.
More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/main/docs/canvaslms_integration/README.md
More details in README: https://github.com/aws-solutions/qnabot-on-aws/blob/v5.2.0/docs/canvaslms_integration.md
- Updated import functionality to support importing of QnABot questions and answers from a Excel file when uploaded to S3 data folder.
- Added support for importing session attributes via Excel.
- Updated runtime of Lambda functions (using Python runtime) to use Python runtime version 3.9.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ As QnABot evolves over the years, it makes use of various services and functiona
_Note: **Deployable solution versions** refers to the ability to deploy the version of QnABot in their AWS accounts. **Actively supported versions** for QnABot is only available for the latest version of QnABot._
### Deployable Versions
- [v6.0.1](https://github.com/aws-solutions/qnabot-on-aws/releases/tag/v6.0.1) - [Public](https://solutions-reference.s3.amazonaws.com/qnabot-on-aws/v6.0.1/qnabot-on-aws-main.template)/[VPC](https://solutions-reference.s3.amazonaws.com/qnabot-on-aws/v6.0.1/qnabot-on-aws-vpc.template)
- [v6.0.0](https://github.com/aws-solutions/qnabot-on-aws/releases/tag/v6.0.0) - [Public](https://solutions-reference.s3.amazonaws.com/qnabot-on-aws/v6.0.0/qnabot-on-aws-main.template)/[VPC](https://solutions-reference.s3.amazonaws.com/qnabot-on-aws/v6.0.0/qnabot-on-aws-vpc.template)
- [v5.5.2](https://github.com/aws-solutions/qnabot-on-aws/releases/tag/v5.5.2) - [Public](https://solutions-reference.s3.amazonaws.com/qnabot-on-aws/v5.5.2/qnabot-on-aws-main.template)/[VPC](https://solutions-reference.s3.amazonaws.com/qnabot-on-aws/v5.5.2md/qnabot-on-aws-vpc.template)
- We recommend to upgrade to this version as it fixes an issue with the testall functionality which may introduce a high number of versions stored in the testall S3 bucket when Content Designer has no Q&As.
Expand Down
6 changes: 3 additions & 3 deletions source/cli/aws_solutions/qnabot/cli/qnabot_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@click.pass_context
def cli(ctx) -> None:
os.environ["SOLUTION_ID"] = "SO0189"
os.environ["SOLUTION_VERSION"] = "v6.0.0"
os.environ["SOLUTION_VERSION"] = "v6.0.1"


@cli.command("import")
Expand Down Expand Up @@ -69,7 +69,7 @@ def qna_import(
This command requires two (2) parameters: <cloudformation-stack-name>, <source-filename>.
The cloudformation-stack-name parameter is used to know the AWS QnABot deployment
to use to support the import process. \n
More information: https://github.com/aws-solutions/aws-qnabot/tree/main/docs/qnabot_cli.md
More information: https://github.com/aws-solutions/qnabot-on-aws/tree/main/source/docs/qnabot_cli/README.md
"""
try:
response = qnabot_cli_helper.initiate_import(
Expand Down Expand Up @@ -128,7 +128,7 @@ def qna_export(ctx, cloudformation_stack_name: str, export_filename: str, export
This command requires two (2) parameters: <cloudformation-stack-name>, and <export-filename>.
The cloudformation-stack-name parameter is used to know the AWS QnABot deployment
to use to support the export process. \n
More information: https://github.com/aws-solutions/aws-qnabot/tree/main/docs/qnabot_cli.md
More information: https://github.com/aws-solutions/qnabot-on-aws/tree/main/source/docs/qnabot_cli/README.md
"""
try:
response = qnabot_cli_helper.initiate_export(
Expand Down
2 changes: 1 addition & 1 deletion source/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"region": "us-east-1",
"profile": "default",
"publicBucket": "solutions",
"publicPrefix": "qnabot-on-aws/v6.0.0",
"publicPrefix": "qnabot-on-aws/v6.0.1",
"devEmail": "",
"ApprovedDomain": "NONE",
"Username": "Admin",
Expand Down
3 changes: 3 additions & 0 deletions source/docs/Technical Information.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@
- ExportBucket - Used for staging files exported from QnABot. API Gateway is used a proxy for the bucket
- ImportBucket - Used for staging files imported into QnABot
- MetricsBucket - All captured usage data is sent to both OpenSearch and this bucket via Kinesis
- MainAccessLogBucket - Access log bucket for the AssetBucket, BuildStatusBucket, ExportBucket, ImportBucket and MetricsBucket
- devBootStrapAccessLogsBucket - Access log bucket for the dev Bootstrap bucket
- devAccessLogsBucket - Access Log bucket for the dev bucket

## Firehose
- TestAllBucket - Results from “Test all” functionality
Expand Down
4 changes: 2 additions & 2 deletions source/docs/handlebars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ QnABot exposes the following content to the Handlebars context:
|SessionAttributes._name_ | all session attributes are available to the handlebars context - see helpers 'setSessionAttr' and 'getSessionAttr' |
|Slots._name_ | all slots filled by Lex are available to the handlebars context - see helper 'getSlot' |
|Settings._name_ | all settings values are available to the handlebars context |
|Question | the users utterance, or question - translated to English if ENABLE\_MULTI\_LANGUAGE\_SUPPORT is true |
|OrigQuestion | the users utterance, or question - before translation to English if ENABLE\_MULTI\_LANGUAGE\_SUPPORT is true |
|Question | the users utterance, or question - translated as appropriate if ENABLE_MULTI_LANGUAGE_SUPPORT is true |
|OrigQuestion | the users utterance, or question - before translation if ENABLE_MULTI_LANGUAGE_SUPPORT is true |
|PreviousQuestion | the users previous utterance, or question |
|Sentiment | the detected sentiment value of user's question/utterance (POSITIVE\|NEGATIVE\|NEUTRAL\|MIXED)|

Expand Down
2 changes: 1 addition & 1 deletion source/docs/qnabot_cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The AWS QnABot CLI supports the capability to `import` and `export` questions an

## Setup Prerequisites
To use the CLI, the following prerequisites are required:
- Download the `source` directory from codebase of AWS QnABot Solution (version 5.2.0 or higher) in [GitHub](https://github.com/aws-solutions/aws-qnabot)
- Download the `source` directory from codebase of AWS QnABot Solution (version 5.2.0 or higher) in [GitHub](https://github.com/aws-solutions/qnabot-on-aws)
- AWS Command Line Interface (CLI). For more information, refer to: https://aws.amazon.com/cli/
- Python version 3.7 or higher. For more information on installing Python, refer to: https://docs.python.org/3/using/index.html
- AWS IAM permissions having the below IAM policy. Attach the below IAM policy to the IAM user or IAM Role that you are using for the AWS CLI. Replace the below values when creating the IAM policy:
Expand Down
85 changes: 85 additions & 0 deletions source/docs/update_or_migrate_deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# In-place upgrade of QnABot

If you have previously deployed the solution and want to perform in-place upgrade, please refer to [Update the solution](https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/update-the-solution.html)

# Migrating QnABot Configurations and Data from Existing Cloudformation Stack to New Cloudformation Stack

If you have previously deployed the solution but do not want to perform in-place upgrade or encountered issues during in-place upgrade or in case of a breaking change which does not allow you to upgrade in place, you may try migrating the solution configuration and data using this procedure:

> **_NOTE:_**
Before getting started, we highly recommend reading [QnABot on AWS Implementation Guide](https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/update-the-solution.html) to plan your deployment and refer to [revisions](https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/revisions.html) for any changes.

A. Deploying Cloudformation Stack:
1. Sign in to the AWS CloudFormation console, select your existing QnABot on AWS CloudFormation stack > Parameters. Make a note of the parameters of your existing stack.
2. Deploy latest QnABot stack by enter the appropriate Amazon S3 URL. For more information on deploying solution, please see [QnABot on AWS Implementation Guide](https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/deploy-the-solution.html):

- If using the default main template: [launch here](https://solutions-reference.s3.amazonaws.com/qnabot-on-aws/latest/qnabot-on-aws-main.template)

- If using the VPC template: [launch here](https://solutions-reference.s3.amazonaws.com/qnabot-on-aws/latest/qnabot-on-aws-vpc.template)

3. Under Parameters, modify them as necessary per the notes made in Step 1.
4. Choose Next.
6. On the Configure stack options page, choose Next.
7. On the Review page, review and confirm the settings. Be sure to check the box acknowledging that the template might create AWS Identity and Access Management (IAM) resources.
8. Choose View change set and verify the changes. Click Submit to deploy the stack.
9. Wait and confirm that deployment is complete

B. Exporting and Import QnAs:

1. Export QnAs from previous stack:

a. Sign in to the content designer of previous stack, choose the tools menu ( ☰ ), and then choose the Export.

b. Click on Export. For more details, please refer to [Importing and exporting chatbot answers](https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/importing-and-exporting-chatbot-answers.html).

> **_NOTE:_**
If for any event QnABot designer is not accessible, you may also find this data in S3 Export Bucket if it has been previously exported. If you do not find this data in export bucket, you may also find it OpenSearch indices.
2. Importing QnAs to new stack:

a. Sign in to the content designer of your newly deployed stack, choose the tools menu ( ☰ ), choose the Import, and then choose From File.

b. Import the JSON file exported previously in Step B.1.b.


C. Verifying and copying settings in the designer:
1. Export settings from previous stack:

a. Sign in to the content designer of previous stack, select the tools menu ( ☰ ), and then choose Settings.

b. Click on Export Settings.


2. Import settings to new stack:

a. Sign in to the content designer of your newly deployed stack, select the tools menu ( ☰ ), and then choose Settings.

b. Click on Import Settings.

3. Please note there maybe new settings or enhancement with new releases. We recommend to review their description and modify them as required.
> **_NOTE:_**
If for any reason, the QnABot designer of the previous stack is not accessible, you may also find these settings backed up in AWS Systems Manager Parameter Store of your previous stack. In that case, you will refer to those settings from the Parameter Store and update them manually in the settings page of the newly deployed stack.

D. Post-migration verification and cleaning:

1. Verify questions, answers and text passages that were imported are successfully loaded in the designer.
2. Verify settings were imported correctly or correct them as necessary.
3. Once you have loaded the questions, choose Edit from the Tools menu, choose LEX REBUILD from the top right edit card menu (⋮) and make sure it's successful. This also re-trains Amazon Lex using the newly added questions as training data. For more information, please refer to [Lex rebuild](https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/configuring-intent-and-slot-matching.html#lex-rebuild).
4. Using chat client provided through QnABot, please ensure that the questions are being answered corrently. You can also use the content designer to tune, test, and troubleshoot answers to fix problems. For more information, please refer to [Tuning, testing, and troubleshooting unexpected answers](https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/tuning-testing-and-troubleshooting-unexpected-answers.html).
> **_NOTE:_**
If you have deployed [AWS Lex Web UI](https://github.com/aws-samples/aws-lex-web-ui/blob/master/README.md) (this is not maintained as part of QnABot on AWS) to integrate with QnABot on AWS, please verify you have updated required information (e.g LexV2BotId, LexV2BotAliasId etc) available under newly deployed QnABot on AWS CloudFormation stack > Outputs. For more details, please refer to [Deploy a Web UI for Your Chatbot](https://aws.amazon.com/blogs/machine-learning/deploy-a-web-ui-for-your-chatbot/).
5. Deleting your previous QnABot stack:

a. Before deleting the previous stack, please validate if you need to retain any AWS CloudWatch Logs and data in AWS S3 buckets created by QnaBot.
b. After validating, you may proceed to delete your existing deployment by selecting your existing QnABot on AWS CloudFormation stack > Delete.


### Frequently Asked Questions (FAQs):
- Do I need to back-up and migrate Amazon DynamoDb database table?
- This is not required as it only contains user chat information to disambiguate follow-up questions from previous question and answer context. Once users start interacting with QnABot, the table rows will be populated and updated.






2 changes: 1 addition & 1 deletion source/docs/using_cloud9/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ npm install latest-version
## Initialize the environment

```bash
git clone https://github.com/aws-solutions/aws-qnabot.git
git clone https://github.com/aws-solutions/qnabot-on-aws.git
sudo yum install jq
```

Expand Down
4 changes: 2 additions & 2 deletions source/lambda/aws-sdk-layer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/lambda/aws-sdk-layer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-layer",
"version": "6.0.0",
"version": "6.0.1",
"description": "QnABot Lambda aws-sdk-layer",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/lambda/cfn-lambda-layer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/lambda/cfn-lambda-layer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cfn-lambda-layer",
"version": "6.0.0",
"version": "6.0.1",
"description": "QnABot Cfn Lambda Layer",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit 7b37073

Please sign in to comment.