+ All Categories
Home > Travel > Building Serverless Chat Bots - AWS August Webinar Series

Building Serverless Chat Bots - AWS August Webinar Series

Date post: 10-Jan-2017
Category:
Upload: amazon-web-services
View: 738 times
Download: 2 times
Share this document with a friend
30
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Leo Zhadanovsky, Principal Solutions Architect, Amazon Web Services Building Serverless Chat Bots
Transcript
Page 1: Building Serverless Chat Bots - AWS August Webinar Series

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

Leo Zhadanovsky, Principal Solutions Architect, Amazon Web Services

Building Serverless Chat Bots

Page 2: Building Serverless Chat Bots - AWS August Webinar Series

AWS Serverless Chatbot Competition

• Create a bot for Slack that runs on AWS Lambda and Amazon API Gateway

• Sponsored by AWS and Slack• Win tickets to AWS re:Invent and more

• Winners will receive mentions in the Serverless Keynote during re:Invent

• Submissions due by September 29• Get started: awschatbot.devpost.com

Page 3: Building Serverless Chat Bots - AWS August Webinar Series

Agenda

What is ChatOps and why is it useful?What are Chat Bots?What are some examples of Chat Bots?What technologies can I use to easily build Chat Bots?How do I build Chat Bots with Slack?What are some risks with building Chat Bots?

Page 4: Building Serverless Chat Bots - AWS August Webinar Series

What is ChatOps?

An approach to communication that allows teams to collaborate and manage many aspects of their infrastructure, code, and data from the comfort and safety of a chat room.

Page 5: Building Serverless Chat Bots - AWS August Webinar Series

Why do I care about ChatOps?

Provides visibility into operations to anyone who has access to your chatChat solutions like Slack are highly extensible, have integrations with Lambda, and third party services, such as PagerDuty, Jira, NewRelic, GitHubBetter and easier than IRCNot behind a VPNMakes operations easy from mobile devices

Page 6: Building Serverless Chat Bots - AWS August Webinar Series

Why?

Built-in archivingEasy dissemination of screenshots, attachments of filesMakes incident response, across teams much easier to handle

Page 7: Building Serverless Chat Bots - AWS August Webinar Series

What are Chat Bots?

A computer program designs to simulate conversation with human users, especially over the InternetIn this context, such bots allow you to improve how you handle DevOps, making the process more efficient, visible, and simple

Page 8: Building Serverless Chat Bots - AWS August Webinar Series

Examples

Monitoring• Many monitoring solutions, such as DataDog have built-in Slack

integration

Page 9: Building Serverless Chat Bots - AWS August Webinar Series

Examples

Page 10: Building Serverless Chat Bots - AWS August Webinar Series

Examples

Page 11: Building Serverless Chat Bots - AWS August Webinar Series

Examples

CI/CD• Integration with Jenkins

Page 12: Building Serverless Chat Bots - AWS August Webinar Series

Examples

Lambda/CloudWatch Events Integration

Page 13: Building Serverless Chat Bots - AWS August Webinar Series

Examples

Yeobot• SQL Queries against your AWS account metadata

Burner (burnerapp.com)• SMS/Voicemail to Slack• Two way

Statuspage.io• Integrate private and public status feeds

Meekan• Schedule meetings

Page 14: Building Serverless Chat Bots - AWS August Webinar Series

What technologies can I use to easily build Chat Bots?

Page 15: Building Serverless Chat Bots - AWS August Webinar Series

AWS Lambda + API Gateway

Page 16: Building Serverless Chat Bots - AWS August Webinar Series

AWS Lambda: Serverless computing

Run code without servers. Pay only for the compute time you consume. Be happy.

Triggered by events or called from APIs:• PUT to an Amazon S3 bucket• Updates to Amazon DynamoDB table• Call to an Amazon API Gateway endpoint• Mobile app back-end call• And many more…

Makes it easy to:• Perform real-time data processing• Build scalable back-end services• Glue and choreograph systems

Page 17: Building Serverless Chat Bots - AWS August Webinar Series

Continuous scaling

No servers to manage

Never pay for idle – no cold servers

(only happy accountants)

Benefits of AWS Lambda

Page 18: Building Serverless Chat Bots - AWS August Webinar Series

Pay-per request

• Buy compute time in 100 ms increments for 21 microcents

• Request charge of 20 microcents

• No hourly, daily, or monthly minimums

• No per-device fees

Never pay for idle!

Free Tier1 million requests and 400,000 GBs of compute

every month, every customer

Page 19: Building Serverless Chat Bots - AWS August Webinar Series

Using AWS Lambda

Bring your own code• Node.js, Java, Python• Bring your own libraries

(even native ones)

Simple resource model• Select power rating from

128 MB to 1.5 GB• CPU and network

allocated proportionately• Reports actual usage

Flexible authorization• Securely grant access to

resources, including VPCs• Fine-grained control over

who can call your functions

Flexible use• Call or send events• Integrated with other AWS

services• Build whole serverless

ecosystems

Page 20: Building Serverless Chat Bots - AWS August Webinar Series

Using AWS LambdaProgramming model• AWS SDK built in (Python

and Node.js)• Eclipse plugin (Java)• Lambda is the “webserver”• Use processes, threads,

/tmp, sockets normally

Stateless• Persist data using Amazon

DynamoDB, S3, or ElastiCache

• No affinity to infrastructure (can’t “log in to the box”)

Authoring functions• Author directly using the

console WYSIWYG editor• Package code as a .zip and

upload to Lambda or S3• Plugins for Eclipse and

Visual Studio• Command line tools

Monitoring and logging• Built-in metrics for requests,

errors, latency, and throttles• Built-in logs in Amazon

CloudWatch Logs

Page 21: Building Serverless Chat Bots - AWS August Webinar Series

Amazon API Gateway: Serverless APIs

Internet

Mobile apps

Websites

Services

AWS Lambda functions

AWS

API Gateway cache

Endpoints on Amazon EC2

Any other publicly accessible endpointAmazon

CloudWatch

Amazon CloudFront

Amazon API Gateway

Page 22: Building Serverless Chat Bots - AWS August Webinar Series

Benefits of Amazon API Gateway

Create a unified API front end for

multiple microservices

DDoS protection and throttling for

back-end systems

Authenticate and authorize requests

Page 23: Building Serverless Chat Bots - AWS August Webinar Series

Slack Integrations

Integrated Apps

Page 24: Building Serverless Chat Bots - AWS August Webinar Series

Slack Integrations

Incoming WebHooks• A simple way to post messages from external sources into Slack.

They make use of normal HTTP requests with a JSON payload, which includes the message and a few other optional details described later

Page 25: Building Serverless Chat Bots - AWS August Webinar Series

Slack Integrations

Outgoing WebHooks• Allow you to listen for triggers in Slack chat messages, which will

then send relevant data to external URL(s) in real-time

Page 26: Building Serverless Chat Bots - AWS August Webinar Series

Slack Integrations

Slash Commands• Allow you to listen for custom triggers in chat messages across

all Slack channels. When a Slash Command is triggered, relevant data will be sent to an external URL in real-time

Page 27: Building Serverless Chat Bots - AWS August Webinar Series

Risks

Unauthorized access to your chat = bad things can happen to your AWS accountUse Two-Factor Authentication!!!Scope IAM policies appropriatelyDon’t go overboard (too much info could be bad)

Page 28: Building Serverless Chat Bots - AWS August Webinar Series

Live Demo

Page 29: Building Serverless Chat Bots - AWS August Webinar Series

AWS Serverless Chatbot Competition

• Create a bot for Slack that runs on AWS Lambda and Amazon API Gateway

• Sponsored by AWS and Slack• Win tickets to AWS re:Invent and more

• Winners will receive mentions in the Serverless Keynote during re:Invent

• Submissions due by September 29• Get started: awschatbot.devpost.com

Page 30: Building Serverless Chat Bots - AWS August Webinar Series

Thank you!

Q & A


Recommended