Coder Social home page Coder Social logo

aassadza-org / serverless-bot-framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-solutions/serverless-bot-framework

0.0 0.0 0.0 4.06 MB

A solution which enables a multilingual conversational platform, facilitating the creation of applications using voice and text

Home Page: https://aws.amazon.com/answers/machine-learning/serverless-bot-framework/

License: Other

Shell 3.10% JavaScript 11.08% Python 64.28% HTML 0.40% CSS 0.68% TypeScript 20.46%

serverless-bot-framework's Introduction

Serverless Bot Framework

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.

On this Page

Architecture Overview

Architecture

AWS CDK Constructs

AWS CDK 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:

  • aws-cognito-apigateway-lambda.
  • aws-lambda-dynamodb.
  • aws-cloudfront-s3
  • aws-s3-lambda
  • aws-lambda-s3.

Deployment

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

Source Code

source/infrastructure Includes AWS CDK code describing the architecture of the solution. This CDK code will be transpiled into Cloudformation template when running build-s3-dist.sh.

source/samples Includes three components, a lambda function that integrates with Amazon Lex, a custom resource, and a front-end web client. This code can be extended to add different functionalities to the bot.

source/services Includes source code for three lambda functions, core, lex-bot, webclient-setup, and polly-service.

source/services/solution-helper A Python Lambda function used as a CloudFormation custom resource for configuring Amazon S3 bucket notifications and to send anonymous metrics.

Creating a custom build

The solution can be deployed through the CloudFormation template available on the solution home page: Serverless Bot Framework. 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.

Prerequisites:

1. Create the deployment packages

Build the distributable:

ARTIFACT_BUCKET=my-bucket-name     # S3 bucket name where customized code will reside
SOLUTION_NAME=my-solution-name     # customized solution name
VERSION=my-version                 # version number for the customized code

cd ./deployment
chmod +x ./build-s3-dist.sh
./build-s3-dist.sh $ARTIFACT_BUCKET $SOLUTION_NAME $VERSION

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.

2. Create Amazon S3 Buckets

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.

aws s3 mb s3://$ARTIFACT_BUCKET --region us-east-1
aws s3 mb s3://$ARTIFACT_BUCKET-us-east-1 --region us-east-1

Deploy the distributable to the Amazon S3 bucket in your account:

aws s3 sync ./global-s3-assets s3://$ARTIFACT_BUCKET/$SOLUTION_NAME/$VERSION --acl bucket-owner-full-control
aws s3 sync ./regional-s3-assets s3://$ARTIFACT_BUCKET-us-east-1/$SOLUTION_NAME/$VERSION --acl bucket-owner-full-control

3. Launch the CloudFormation template.

  • Get the link of the serverless-bot-framework.template uploaded to your Amazon S3 bucket.
  • Deploy the serverless bot framework to your account by launching a new AWS CloudFormation stack using the link of the serverless-bot-framework.template.

Known Behavior

When using the 'Leave Feedback' intent, the bot only accepts one-word feedback.


Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.removed api and email

serverless-bot-framework's People

Contributors

aassadza avatar dependabot[bot] avatar jpeddicord avatar shsenior avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.