Skip to content

Commit 8579237

Browse files
authored
Merge pull request #724 from aws-samples/development
Release v0.21.5
2 parents 22f8273 + 97d4e60 commit 8579237

27 files changed

+317
-2152
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [0.21.4] - 2024-07-15
8+
- Removed pipeline deployment mode as CodeCommit is no longer accepting new repositories
9+
- Cleaned up some issues around lambda layer building
10+
711
## [0.21.4] - 2024-07-15
812
- The Lex Web UI can now act as a passthrough for Q Business, allowing users to converse directly with their Q Business application while inheriting all the features of the Web UI such as embedding, CSS customizations and more.
913
- Upgraded version of amazon-connect-chatjs

README-connect-live-chat.md

-26
Original file line numberDiff line numberDiff line change
@@ -80,32 +80,6 @@ messages to the user, set the ConnectWaitForAgentMessageIntervalInSeconds to 0.
8080

8181
Once you have the parameters set, Create or update your stack.
8282

83-
### Using the pipeline template
84-
85-
The pipeline templates setup a new pipeline and code commit repo which deploys LexWebUi. The master-pipeline.yaml
86-
template can be used to create a new pipeline and kick off execution of the pipeline. For a new pipeline, the same
87-
parameters described above can be specified. When complete, the newly deployed Lex Web Ui
88-
will have an updated lex-web-ui-loader-config.json file containing all the values specified for Connect Live Chat.
89-
Future modifications to connect live chat parameters should occur in the lex-web-ui-loader-config.json file and
90-
then be committed to code commit repo for deployment.
91-
92-
The new parameters configurable in lex-web-ui-loader-config.json are shown below.
93-
94-
```
95-
"connect": {
96-
"contactFlowId" : "YOUR CONTACT FLOW ID",
97-
"instanceId" : "YOUR CONNECT INSTANCE ID",
98-
"apiGatewayEndpoint" : "Your newly created Amazon API Gateway endpoint",
99-
"promptForNameMessage": "Before starting a live chat, please tell me your name?",
100-
"waitingForAgentMessage": "Thanks for waiting. An agent will be with you when available.",
101-
"waitingForAgentMessageIntervalSeconds": 60,
102-
"agentJoinedMessage": "{Agent} has joined.",
103-
"agentLeftMessage": "{Agent} has left.",
104-
"chatEndedMessage": "Chat ended.",
105-
"attachChatTranscript": true
106-
},
107-
```
108-
10983
## Usage
11084

11185
Once the stack creation has completed, you can open the parent page hosting the Lex Web UI on your browser.

README-css-style.md

+1-16
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,7 @@ modifications outlined in this README.
1717
* Modify the CSS accordingly and save the file locally on your desktop
1818
* Upload the custom-chatbot-style.css back to your WebApp S3 bucket
1919
* Use the CloudFront console to invalidate the CloudFront distribution such that it will be served up immediately
20-
21-
* CodePipeline/CodeBuild distribution
22-
If you have used the master-pipeline.yaml to create a CodCommit/CodePipeline/CodeBuild distribution mechanism,
23-
follow these steps.
24-
* git clone the repo from CodeCommit
25-
* Modify the CSS accordingly in your local repo
26-
* Modify the root level Makefile and uncomment the lines noted below
27-
```
28-
# @echo "[INFO] copying custom-chatbot-style.css and setting cache max-age=0"
29-
# aws s3 cp \
30-
# --metadata-directive REPLACE --cache-control max-age=0 \
31-
# "$(DIST_DIR)/custom-chatbot-style.css" s3://$(WEBAPP_BUCKET)
32-
```
33-
* Commit and push the changes to both files
34-
* The resulting CodeBuild execution will publish the modified custom-chatbot-style.css to your WebApp S3 bucket.
35-
20+
3621
## Summary of available css modifications
3722

3823
![Common use of CSS for LexWebUi](./img/LexWebUiStyle.png)

README-qbusiness.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This feature supports integration with file attachments, enable both to allow QB
1212
1. An existing deployment of a Q Business application is required for this solution. Please reference the AWS docs for creating a new [Q Business application](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/create-application.html)
1313

1414
### Deploy the Web UI
15-
1. A deployment of the Lex Web UI with login enabled is required for Q Business integration. To launch a new
15+
1. A deployment of the Lex Web UI with login enabled is required for Q Business integration. To launch a new deployment of the Web UI, go to the main [README](https://github.com/aws-samples/aws-lex-web-ui/blob/master/README.md) and select `Launch` for the region where your Q Business app is deployed.
1616

1717
2. The other bot fields for both V1 & V2 bots must be empty for the template to create the Q Business integration bot, please ensure that `Lex V1 Bot Configuration Parameters` and `Lex V2 Bot Configuration Parameters` are blank.
1818

@@ -69,4 +69,4 @@ This feature supports integration with file attachments, enable both to allow QB
6969

7070
Your deployment of the Web UI should now talk directly to Amazon Q Business and return the same responses as the default web experience. In addition, by turning on upload capabilities you can ask Q Business questions about documents and get GenAI answers.
7171

72-
![QBusinessDemo](./img//QBusiness.gif)
72+
![QBusinessDemo](./img//QBusiness.gif)

build/Makefile

+36-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ VPATH := $(OUT)
2121

2222
# upload files to bootstrap bucket
2323
# NOTE: files uploaded with public read permissions
24-
upload: upload-templates upload-src-zip upload-response-card-image \
25-
upload-initiate-chat-lambda upload-streaming-lambda upload-qbusiness-lambda
24+
upload: upload-templates upload-custom-resources-zip upload-src-zip upload-layers \
25+
upload-response-card-image upload-initiate-chat-lambda upload-streaming-lambda upload-qbusiness-lambda
2626
.PHONY: upload
2727

2828
# create the output directory for tracking dependencies
@@ -37,8 +37,42 @@ upload-templates: $(TEMPLATES) | $(OUT)
3737
aws s3 sync --acl public-read --exclude "*" --include "*.yaml" \
3838
"$(TEMPLATES_DIR)" "s3://$(BOOTSTRAP_BUCKET_PATH)/templates/" \
3939
| tee "$(OUT)/$(@)"
40+
aws s3 cp "$(TEMPLATES_DIR)"/layers.zip \
41+
"s3://${BOOTSTRAP_BUCKET_PATH}/layers.zip"
4042
@echo "[INFO] master template: https://s3.amazonaws.com/$(BOOTSTRAP_BUCKET_PATH)/templates/master.yaml"
4143

44+
LAMBDA_LAYER_ZIP := $(TEMPLATES_DIR)/layers.zip
45+
46+
upload-layers:
47+
@echo "[INFO] Uploading lambda layer"
48+
aws s3 cp --acl public-read "$(LAMBDA_LAYER_ZIP)" "s3://${BOOTSTRAP_BUCKET_PATH}/layers.zip"
49+
50+
# cfn custom resource lambda files are found under this directory
51+
CUSTOM_RESOURCES_DIR := $(TEMPLATES_DIR)/custom-resources
52+
53+
# zip cfn custom resource lambda files
54+
PY_MODULES := $(CUSTOM_RESOURCES_DIR)/py_modules
55+
CUSTOM_RESOURCES_ZIP := custom-resources-$(VERSION).zip
56+
CUSTOM_RESOURCES_FILES := $(wildcard $(CUSTOM_RESOURCES_DIR)/*.py)
57+
CUSTOM_RESOURCES_FILES += $(PY_MODULES)
58+
$(PY_MODULES):
59+
pushd $(CUSTOM_RESOURCES_DIR) ; \
60+
[ -f requirements.txt ] && \
61+
python3 -m pip install --upgrade -r requirements.txt -t ./py_modules || true ; \
62+
popd ;
63+
$(CUSTOM_RESOURCES_ZIP): $(CUSTOM_RESOURCES_FILES) | $(OUT)
64+
@echo "[INFO] Creating custom resource Lambda zip file"
65+
zip -u -j "$(OUT)/$(@)" $(?) ; \
66+
pushd $(CUSTOM_RESOURCES_DIR)/py_modules ; \
67+
zip -r -q "../../../build/$(OUT)/$(@)" . ; \
68+
popd ;
69+
upload-custom-resources-zip: $(CUSTOM_RESOURCES_ZIP) | $(OUT)
70+
@echo "[INFO] Uploading custom resources Lambda zip file"
71+
aws s3 cp --acl public-read \
72+
"$(OUT)/$(CUSTOM_RESOURCES_ZIP)" \
73+
"s3://$(BOOTSTRAP_BUCKET_PATH)/$(CUSTOM_RESOURCES_ZIP)" \
74+
| tee -a "$(OUT)/$(@)"
75+
4276
# initiate chat lambda function
4377

4478
INITIATE_CHAT_LAMBDA_DIR := $(SOURCE_DIR)/initiate-chat-lambda

build/release.sh

+7-26
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,30 @@ case $unamestr in
77
"Darwin" | "FreeBSD")
88
sed -i '' -e "s/(v.*)/($VERSION)/g" \
99
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
10+
-e "s/custom-resources-.*zip/custom-resources-$VERSION.zip/g" \
1011
-e "s/src-.*zip/src-$VERSION.zip/g" \
1112
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
12-
../templates/master.yaml;
13-
14-
sed -i '' -e "s/(v.*)/($VERSION)/g" \
15-
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
16-
-e "s/src-.*zip/src-$VERSION.zip/g" \
17-
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
18-
../templates/master-pipeline.yaml;;
13+
../templates/master.yaml;;
1914

2015
"Linux")
2116
sed -i -e "s/(v.*)/($VERSION)/g" \
2217
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
2318
-e "s/src-.*zip/src-$VERSION.zip/g" \
2419
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
2520
-e "s/streaming-lambda-.*zip/streaming-lambda-$VERSION.zip/g" \
21+
-e "s/custom-resources-.*zip/custom-resources-$VERSION.zip/g" \
2622
-e "s/qbusiness-lambda-.*zip/qbusiness-lambda-$VERSION.zip/g" \
27-
../templates/master.yaml;
28-
29-
sed -i -e "s/(v.*)/($VERSION)/g" \
30-
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
31-
-e "s/src-.*zip/src-$VERSION.zip/g" \
32-
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
33-
-e "s/streaming-lambda-.*zip/streaming-lambda-$VERSION.zip/g" \
34-
-e "s/streaming-lambda-.*zip/qbusiness-lambda-$VERSION.zip/g" \
35-
../templates/master-pipeline.yaml;;
23+
../templates/master.yaml;;
3624

3725
*)
3826
sed -i -e "s/(v.*)/($VERSION)/g" \
3927
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
4028
-e "s/src-.*zip/src-$VERSION.zip/g" \
4129
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
4230
-e "s/streaming-lambda-.*zip/streaming-lambda-$VERSION.zip/g" \
31+
-e "s/custom-resources-.*zip/custom-resources-$VERSION.zip/g" \
4332
-e "s/qbusiness-lambda-.*zip/qbusiness-lambda-$VERSION.zip/g" \
44-
../templates/master.yaml;
45-
46-
sed -i -e "s/(v.*)/($VERSION)/g" \
47-
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
48-
-e "s/src-.*zip/src-$VERSION.zip/g" \
49-
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
50-
-e "s/streaming-lambda-.*zip/streaming-lambda-$VERSION.zip/g" \
51-
-e "s/qbusiness-lambda-.*zip/qbusiness-lambda-$VERSION.zip/g" \
52-
../templates/master-pipeline.yaml;;
53-
33+
../templates/master.yaml;;
5434

5535
esac
5636
cd ../lex-web-ui
@@ -59,6 +39,7 @@ npm run build-dist
5939
cd ..
6040
make
6141
cd build
42+
make "custom-resources-$VERSION.zip"
6243
make "initiate-chat-lambda-$VERSION.zip"
6344
make "streaming-lambda-$VERSION.zip"
6445
make "qbusiness-lambda-$VERSION.zip"

build/upload-bootstrap.sh

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ popd
2626
aws s3 cp out/src-$version.zip \
2727
"s3://${BOOTSTRAP_BUCKET_PATH}/src-$version.zip"
2828

29+
aws s3 cp out/custom-resources-$version.zip \
30+
"s3://${BOOTSTRAP_BUCKET_PATH}/custom-resources-$version.zip"
31+
2932
aws s3 cp out/initiate-chat-lambda-$version.zip \
3033
"s3://${BOOTSTRAP_BUCKET_PATH}/initiate-chat-lambda-$version.zip"
3134

dist/lex-web-ui-loader.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lex-web-ui-loader.min.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* lex-web-ui v0.21.4
2+
* lex-web-ui v0.21.5
33
* (c) 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
* Released under the Amazon Software License.
55
*/

dist/lex-web-ui.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wav-worker.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wav-worker.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lex-web-ui/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lex-web-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lex-web-ui",
3-
"version": "0.21.4",
3+
"version": "0.21.5",
44
"description": "Amazon Lex Web Interface",
55
"author": "AWS",
66
"license": "Amazon Software License",

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aws-lex-web-ui",
3-
"version": "0.21.4",
3+
"version": "0.21.5",
44
"description": "Sample Amazon Lex Web Interface",
55
"main": "dist/lex-web-ui.min.js",
66
"repository": {

0 commit comments

Comments
 (0)