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

Commit cb5149c

Browse files
committed
Update to version v1.4.0
1 parent d921229 commit cb5149c

File tree

69 files changed

+29696
-8708
lines changed

Some content is hidden

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

69 files changed

+29696
-8708
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*.bin
88
.staging
99
.DS_STORE
10-
node_modules/
10+
**/node_modules
1111
venv/
1212
__pycache__/
1313
.pytest_cache

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,55 @@
11
# Change Log
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

8+
## [1.4.0] - 2020-11-23
9+
10+
### Added
11+
12+
- Implementation to use [AWS Cloud Development Kit (AWS CDK)](https://aws.amazon.com/cdk/) and architecture patterns from [AWS Solutions Constructs](https://aws.amazon.com/solutions/constructs/) to create AWS CloudFormation template.
13+
- aws-cognito-apigateway-lambda.
14+
- aws-lambda-dynamodb.
15+
- aws-cloudfront-s3
16+
- aws-s3-lambda
17+
- aws-lambda-s3.
18+
719
## [1.3.0] - 2020-10-27
20+
821
### Added
22+
923
- A dynamic chatbot that demonstrates how to integrate a chatbot with a back-end database, such as Amazon DynamoDB, to build an automated order taking service (in this example, a pizza ordering service).
1024
- When the customer starts their order, the chatbot retrieves the pizza menu from the back-end database, and displays it to the customer.
1125
- The chatbot interacts with the customer to extract order details (for example, type and size of the pizza) and confirms the order.
1226
- The order history is stored in a DynamoDB table, which helps facilitate a personalized customer experience.
1327
- Functionality to automatically extract user's email, used by Amazon Cognito to authenticate the user with Amazon API Gateway, to use it as customerId.
1428

1529
## [1.2.0] - 2020-6-30
30+
1631
### Added
32+
1733
- Support for using API keys to get weather data.
1834
- Functionality to write customer feedback to DynamoDB.
1935

2036
### Changed
37+
2138
- Synchronized audio and text response in sample web client.
2239

2340
## [1.1.0] - 2020-3-30
41+
2442
### Added
43+
2544
- Cognito with Amplify javascript framework to have sign-in/register in place for secure access to the web application.
2645
- Encryption to all S3 and logging S3 buckets.
2746
- Cloudfront to the web app hosted in S3. Restricted access to the web app S3 bucket to Cloudfront only.
2847

2948
### Changed
49+
3050
- Re-implemented the user interface in ReactJS (previously implemented with vanilla Javascript) to make it easier to add or modify components for later updates.
3151
- Syntax for lambda functions in node8 to node12
3252
- Syntax for lambda functions in python2 to python3
3353
- The Solution Helper package to the newest version compatible with python3
3454
- Integrated Cognito user pool authentication with API Gateway and removed authorization with stored API Keys.
3555
- License changed to Apache License 2.0
36-

README.md

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
# Serverless Bot Framework
2-
The Serverless Bot Framework is a collection of AWS services combined into a single solution that any company can use to have a scalable and high-available multi-language audiobot, chatbot and touch interface with their customers.
32

3+
The Serverless Bot Framework is a collection of AWS services combined into a single solution that any company can use to have a scalable and high-available multi-language audiobot, chatbot and touch interface with their customers.
44

55
## On this Page
6+
67
- [Architecture Overview](#architecture-overview)
78
- [Deployment](#deployment)
89
- [Source Code](#source-code)
910
- [Creating a custom build](#additional-resources)
1011

11-
1212
## Architecture Overview
13+
1314
![Architecture](deployment/architecture.png)
1415

16+
## AWS CDK Constructs
17+
18+
[AWS CDK Solutions Constructs](https://aws.amazon.com/solutions/constructs/) make it easier to consistently create well-architected applications. All AWS Solutions Constructs are reviewed by AWS and use best practices established by the AWS Well-Architected Framework. This solution uses the following AWS CDK Constructs:
19+
20+
- aws-cognito-apigateway-lambda.
21+
- aws-lambda-dynamodb.
22+
- aws-cloudfront-s3
23+
- aws-s3-lambda
24+
- aws-lambda-s3.
25+
1526
## Deployment
27+
1628
The solution is deployed using a CloudFormation template with a lambda backed custom resource. For details on deploying the solution please see the details on the solution home page: [Serverless Bot Framework](https://aws.amazon.com/solutions/serverless-bot-framework/)
1729

1830
## Source Code
@@ -29,43 +41,57 @@ Includes source code for three lambda functions, core, custom-resource, and poll
2941
**source/services/custom-resource**
3042
A Python Lambda function used as a CloudFormation custom resource for configuring Amazon S3 bucket notifications and to send anonymous metrics.
3143

32-
3344
## Creating a custom build
45+
3446
The solution can be deployed through the CloudFormation template available on the solution home page: [Serverless Bot Framework](https://aws.amazon.com/solutions/implementations/serverless-bot-framework/).
3547
To make changes to the solution, download or clone this repo, update the source code and then run the deployment/build-s3-dist.sh script to deploy the updated Lambda code to an Amazon S3 bucket in your account.
3648

3749
### Prerequisites:
38-
* [AWS Command Line Interface](https://aws.amazon.com/cli/)
39-
* Node.js 12.x or later
40-
* (Optional) [AccuWeather](https://developer.accuweather.com/) or [OpenWeather](https://openweathermap.org/api) API keys
4150

42-
### 1. Create an Amazon S3 Bucket
43-
The CloudFormation template is configured to pull the Lambda deployment packages from Amazon S3 bucket in the region the template is being launched in. Create a bucket in the desired region with the region name appended to the name of the bucket. eg: for us-east-1 create a bucket named: ```my-bucket-us-east-1```
44-
```
45-
aws s3 mb s3://my-bucket-us-east-1
46-
```
51+
- [AWS Command Line Interface](https://aws.amazon.com/cli/)
52+
- Node.js 12.x or later
53+
- (Optional) [AccuWeather](https://developer.accuweather.com/) or [OpenWeather](https://openweathermap.org/api) API keys
54+
55+
### 1. Create the deployment packages
4756

48-
### 2. Create the deployment packages
4957
Build the distributable:
58+
5059
```
60+
ARTIFACT_BUCKET=my-bucket-name # S3 bucket name where customized code will reside
61+
SOLUTION_NAME=my-solution-name # customized solution name
62+
VERSION=my-version # version number for the customized code
63+
64+
cd ./deployment
5165
chmod +x ./build-s3-dist.sh
52-
./build-s3-dist.sh my-bucket serverless-bot-framework %%VERSION%%-custom
66+
./build-s3-dist.sh $ARTIFACT_BUCKET $SOLUTION_NAME $VERSION
5367
```
5468

5569
> **Notes**: The _build-s3-dist_ script expects the bucket name as one of its parameters, and this value should not include the region suffix. In addition to that, the version parameter will be used to tag the npm packages, and therefore should be in the [Semantic Versioning format](https://semver.org/spec/v2.0.0.html).
5670
71+
### 2. Create Amazon S3 Buckets
72+
73+
The CloudFormation template is configured to pull the Lambda deployment packages from Amazon S3 buckets in the region the template is being launched in. You need to create two buckets in the desired region. The names of the buckets should be `$ARTIFACT_BUCKET` and `$ARTIFACT_BUCKET-<region-name>`. For example, the following will create two buckets in the us-east-1 region.
74+
75+
```
76+
aws s3 mb s3://$ARTIFACT_BUCKET --region us-east-1
77+
aws s3 mb s3://$ARTIFACT_BUCKET-us-east-1 --region us-east-1
78+
```
79+
5780
Deploy the distributable to the Amazon S3 bucket in your account:
81+
5882
```
59-
aws s3 cp ./regional-s3-assets/ s3://my-bucket-us-east-1/serverless-bot-framework/%%VERSION%%-custom/ --recursive --acl bucket-owner-full-control
83+
aws s3 sync ./global-s3-assets s3://$ARTIFACT_BUCKET/$SOLUTION_NAME/$VERSION --acl bucket-owner-full-control
84+
aws s3 sync ./regional-s3-assets s3://$ARTIFACT_BUCKET-us-east-1/$SOLUTION_NAME/$VERSION --acl bucket-owner-full-control
6085
```
6186

6287
### 3. Launch the CloudFormation template.
63-
* Get the link of the serverless-bot-framework.template uploaded to your Amazon S3 bucket.
64-
* Deploy the serverless bot framework to your account by launching a new AWS CloudFormation stack using the link of the serverless-bot-framework.template.
6588

66-
***
89+
- Get the link of the serverless-bot-framework.template uploaded to your Amazon S3 bucket.
90+
- Deploy the serverless bot framework to your account by launching a new AWS CloudFormation stack using the link of the serverless-bot-framework.template.
91+
92+
---
6793

68-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
94+
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
6995

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

0 commit comments

Comments
 (0)