Top Banner
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Olivier Klein, Emerging Technologies Solutions Architect, Asia-Pacific December 1, 2016 All Your Chats Belong to Bots: Building a Serverless Customer Service Bot SVR310
22

AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Apr 16, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Olivier Klein, Emerging Technologies Solutions Architect, Asia-Pacific

December 1, 2016

All Your Chats Belong to Bots: Building

a Serverless Customer Service Bot

SVR310

Page 2: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)
Page 3: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Hello WildRydes!

Hey there, how can

we help?

Automated/Assisted

Responses via

Chatbot

Data Storage for

message

communication

history

Sentiment Analysis &

Dashboard to

understand customer

satisfaction

Page 4: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

What are we building today?

Customer service bot for WildRydes

• Integration with Facebook Messenger and

Facebook Graph API

• Slack App for operations team to use

channel commands and approve answers

AWS Lambda functions that perform

Natural Language Processing (NLP)

with the help of NLTK

Sentiment Analysis with live customer

“satisfaction” dashboard

Page 5: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

We Architect to be Serverless

Fully Managed

• No provisioning

• Zero administration

• High availability

Developer Productivity

• Focus on the code

• Innovate rapidly

• Reduce time to market

Scalability

• Automatically

• Scale up and down

Page 6: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Many Serverless Options on AWS

Storage

Database

Compute

Messaging and Queues

Gateways

User Management

Internet of Things

Machine Learning

Streaming Analytics

Search

Page 7: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

What AWS services and tools will we use here?

Page 8: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

AWS Lambda

Run your code without thinking about

servers. Pay only for compute time

you consume.

Triggered through API calls or state

changes in your AWS environment

Scales automatically to match the

incoming event rate

Charged per 100ms execution time

AWS Lambda

Page 9: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Amazon

S3

Amazon

DynamoDB

Amazon

Kinesis

AWS

CloudFormationAWS

CloudTrailAmazon

CloudWatch

Amazon

SNS

Amazon

SES

Amazon

API Gateway

Amazon

Cognito

AWS

IoT

Amazon

Alexa

Cron events

DATA STORES ENDPOINTS

REPOSITORIES EVENT/MESSAGE SERVICES

Event sources that integrate with AWS Lambda

… and the list continues to grow.

AWS

Config

Page 10: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Amazon API Gateway

Fully managed and scalable RESTful

API gateway service

Powered by our content delivery

network via 68 global edge locations

Provides DDoS protection and

throttling capabilities

Multiple API stages that you define

(e.g., dev, test, prod)

AWS

Lambda

Amazon

API

Gateway

Amazon EC2

AWS API

On-premises

server

Page 11: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Webhooks – Integrate with other platforms

Facebook

AWS Lambda

Slack

Amazon

API

Gateway

Page 12: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

NLTK is a toolkit written in Python to

facilitate Natural Language Processing

(NLP)

Provides easy-to-use interfaces for

classification, tokenization, stemming,

tagging, parsing, and semantic reasoning

VADER - Rule-based Model for Sentiment

Analysis of Social Media Text

www.nltk.org

Natural Language Toolkit - NLTK

Page 13: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Elasticsearch & Kibana

Open-source search and

analytics engine

Schema free with a developer

friendly RESTful API

Kibana integrates with

Elasticsearch for in-browser

visualizations

POST /movie_db/_search{"query": {

"match": {"description": "hacking"}},"aggs": {

"genre": {"terms": {"field": "genre“}}}

}

Page 14: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Amazon Elasticsearch Service (ES)

Managed service to deploy, operate and

scale Elasticsearch on AWS

Scales for data size and throughput

Integration with AWS IAM, Cloudtrail, and

CloudWatch access control, auditing,

and monitoring

Integrates Kibana for in-browser

visualizations

Amazon

Elasticsearch

Service

Page 15: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Amazon DynamoDB

Amazon

DynamoDB

table

items

attributes

Fast and flexible NoSQL database

service

No storage or throughput limits

Consistent, single-digit millisecond

latency at any scale

Document and key-value store

models

Replicated across 3 facilities

Page 16: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Let’s get started!

Page 17: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

What does it consist of?

1. Integrate with Facebook Messenger via

webhooks

2. Build a serverless Slack app and

integrate with our operations Slack

channel

3. Build and query a knowledge base

4. Create an NLP AWS Lambda function

5. Real-time Sentiment Analysis

Dashboard

Page 18: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Architecture Overview

Page 19: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Facebook

AWS Lambda

Slack

Amazon

API

Gateway

Amazon Elasticsearch

Service

Amazon

DynamoDB

Facebook

Graph API

Slack API

Architecture Overview

Page 20: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Steps to get started

• Break into a group (max. 2 people), or work solo!

• Open GitHub repository and read through the README

• Launch the AWS SAM CloudFormation stack

• Decide on other extensions you want to build!

• Share your designs with fellow WildRyders!

Workshop available at:

https://github.com/awslabs/serverless-chatbots-workshop

Page 21: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Thank you!

Page 22: AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless Customer Service Bot (SVR310)

Remember to complete

your evaluations!