Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.

Commit ba6ce5c

Browse files
committed
Update to version v1.5.0
1 parent ee41ad0 commit ba6ce5c

File tree

56 files changed

+14772
-6387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+14772
-6387
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
venv/
1212
__pycache__/
1313
.pytest_cache
14-
geckodriver.log
14+
geckodriver.log
15+
.eslintcache

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.5.0] - 2021-2-8
9+
10+
### Added
11+
12+
- Implementation to use [Amazon Lex](https://aws.amazon.com/lex/) as the processing module of the chatbot.
13+
- Parameter to choose between the existing custom ML model or Amazon Lex as the processing module of the chatbot.
14+
- Sample interaction for the chatbot application when Amazon Lex is chosen.
15+
16+
### Changed
17+
18+
- Architecture diagram depicting the structure of AWS services to include Amazon Lex.
19+
- Implementation Guide document to provide context for customers on using Amazon Lex.
20+
821
## [1.4.0] - 2020-11-23
922

1023
### Added

NOTICE.txt

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Serverless Bot Framework
22

3-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4-
5-
Licensed under the Apache License Version 2.0 (the 'License'). You may not use this file except in compliance
6-
with the License. A copy of the License is located at
7-
8-
http://www.apache.org/licenses/
9-
10-
or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
11-
OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
12-
and limitations under the License.
3+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
5+
Licensed under the Apache License Version 2.0 (the 'License'). You may not use this file except in compliance
6+
with the License. A copy of the License is located at
7+
8+
http://www.apache.org/licenses/
9+
10+
or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
11+
OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
12+
and limitations under the License.
1313

1414

1515
**********************
@@ -20,20 +20,24 @@ This software includes third party software subject to the following copyrights:
2020
adm-zip under the Massachusetts Institute of Technology (MIT) license
2121
aws-amplify under the Apache License Version 2.0 license
2222
AWS SDK under the Apache License Version 2.0
23+
aws-sdk-mock under the Apache License Version 2.0
2324
axios under the Massachusetts Institute of Technology (MIT) license
2425
bluebird under the Massachusetts Institute of Technology (MIT) license
2526
bluebird-as under the Massachusetts Institute of Technology (MIT) license
2627
boto3 under the Apache License Version 2.0
2728
crhelper under the Apache License Version 2.0
2829
dateformat under the Massachusetts Institute of Technology (MIT) license
2930
dispatcherjs under the Massachusetts Institute of Technology (MIT) license
31+
dotenv under BSD-2-clause License
3032
events under the Massachusetts Institute of Technology (MIT) license
3133
fuzzysearch-js under the Massachusetts Institute of Technology (MIT) license
34+
jest under the Massachusetts Institute of Technology (MIT) license
3235
js-combinatorics under the Massachusetts Institute of Technology (MIT) license
3336
mocha under the Massachusetts Institute of Technology (MIT) license
3437
moment under the Massachusetts Institute of Technology (MIT) license
3538
multilabelsvm under the Internet Systems Consortium (ISC) license
3639
natural under the Massachusetts Institute of Technology (MIT) license
40+
order-id under the Massachusetts Institute of Technology (MIT) license
3741
path under the Massachusetts Institute of Technology (MIT) license
3842
react under the Massachusetts Institute of Technology (MIT) license
3943
react-testing-library under the Massachusetts Institute of Technology (MIT) license
@@ -46,6 +50,5 @@ underscore.string under the Massachusetts Institute of Technology (MIT) license
4650
util under the Massachusetts Institute of Technology (MIT) license
4751
uuid under the Massachusetts Institute of Technology (MIT) license
4852
winston under the Massachusetts Institute of Technology (MIT) license
49-
order-id under the Massachusetts Institute of Technology (MIT) license
5053

5154
The licenses for these third party components are included in LICENSE.txt

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,13 @@ aws s3 sync ./regional-s3-assets s3://$ARTIFACT_BUCKET-us-east-1/$SOLUTION_NAME/
8989
- Get the link of the serverless-bot-framework.template uploaded to your Amazon S3 bucket.
9090
- Deploy the serverless bot framework to your account by launching a new AWS CloudFormation stack using the link of the serverless-bot-framework.template.
9191

92+
## Known Behavior
93+
94+
When you choose Amazon Lex for the `BotBrain` parameter, updating the CloudFormation stack will not update the chatbot in Amazon Lex.
95+
9296
---
9397

94-
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
98+
Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
9599

96100
Licensed under the Apache License, Version 2.0 (the "License");
97101
you may not use this file except in compliance with the License.

deployment/architecture.png

6.21 KB
Loading

deployment/build-s3-dist.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
set -e
1414

1515
# Important: CDK global version number
16-
cdk_version=1.73.0
16+
cdk_version=1.84.0
1717

1818
# Check to see if input has been provided:
1919
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
@@ -97,6 +97,11 @@ echo "--------------------------------------------------------------------------
9797
cd $source_dir/services/solution-helper
9898
pip3 install -r requirements.txt --target .
9999
echo ""
100+
echo "------------------------------------------------------------------------------"
101+
echo "[Packing] Lex Bot"
102+
echo "------------------------------------------------------------------------------"
103+
cd $source_dir/services/lex-bot
104+
pip3 install -r requirements.txt --target .
100105
echo ""
101106
echo "------------------------------------------------------------------------------"
102107
echo "[Packing] Order Pizza"

deployment/run-unit-tests.sh

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,14 @@ echo "Running unit tests"
1010
# Get reference for source folder
1111
source_dir="$PWD/../source"
1212

13-
echo "cd $source_dir/modules/b2.core"
14-
cd $source_dir/modules/b2.core
15-
npm ci
16-
# npm test
17-
18-
echo "cd $source_dir/services/core"
19-
cd $source_dir/services/core
20-
npm ci
21-
# npm test
22-
23-
echo "cd $source_dir/services/polly-service"
24-
cd $source_dir/services/polly-service
25-
npm ci
26-
# npm test
27-
28-
echo "cd $source_dir/services/train-model"
29-
cd $source_dir/services/train-model
30-
npm ci
31-
# npm test
32-
3313
echo "cd $source_dir/samples/bot-weather-forecast"
3414
cd $source_dir/samples/bot-weather-forecast
3515
python3 setup.py install
3616
pip3 install -r requirements.txt --target .
3717
pip3 install -r dev-requirements.txt
3818
python3 test.py
3919

40-
echo "cd $source_dir/samples/leave-feedback"
41-
cd $source_dir/samples/leave-feedback
42-
# npm test
43-
4420
echo "cd $source_dir/samples/order-pizza"
4521
cd $source_dir/samples/order-pizza
46-
# npm test
22+
npm ci
23+
npm test

source/infrastructure/lib/brain-s3bucket-train-model-lambda-construct.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class BrainS3ToTrainModelLambda extends Construct {
4545
}
4646
);
4747

48-
/** Grane TrainModel Lambda permissions on Brain Bucket */
48+
/** Grant TrainModel Lambda permissions on Brain Bucket */
4949
brainS3ToTrainModelLambda.lambdaFunction.addToRolePolicy(
5050
new PolicyStatement({
5151
effect: Effect.ALLOW,

source/infrastructure/lib/cognito-api-lambdas-construct.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import { Construct, Aws } from '@aws-cdk/core';
1515
import { Function } from '@aws-cdk/aws-lambda';
16+
import { CfnLogGroup } from '@aws-cdk/aws-logs';
1617
import { CfnAuthorizer, RestApi } from '@aws-cdk/aws-apigateway';
1718
import {
1819
LambdaIntegration,
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*********************************************************************************************************************
2+
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. *
3+
* *
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance *
5+
* with the License. A copy of the License is located at *
6+
* *
7+
* http://www.apache.org/licenses/LICENSE-2.0 *
8+
* *
9+
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES *
10+
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions *
11+
* and limitations under the License. *
12+
*********************************************************************************************************************/
13+
import { IAspect, IConstruct, CfnCondition, CfnResource } from '@aws-cdk/core';
14+
15+
16+
export class ConditionalResource implements IAspect {
17+
private readonly condition: CfnCondition;
18+
constructor(condition: CfnCondition) {
19+
this.condition = condition;
20+
}
21+
/** Modifying the visit function of IAspect */
22+
public visit(node: IConstruct): void {
23+
const resource = (node as CfnResource);
24+
if (resource.cfnOptions) {
25+
resource.cfnOptions.condition = this.condition;
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)