Chat bots can help you increase visibility and improve operations or help your customers easily get information through a natural, conversational interface. In this webinar, you will learn how you use a chat bot to manage many aspects of your infrastructure, code, and data all from the comforts of a chat room. You'll learn how AWS Lambda can be used to run your chat bots. We’ll also demonstrate step-by-step how you can use AWS Lambda to easily build and run your first Slack bot – all without the need to provision and manage servers. Join us to: - Understand the basics of chatops - Learn how to use Lambda to create bots - Build a Slack bot running on Lambda Who should attend: Developers
2. 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
3. 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?
4. 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.
5. Why do I care about ChatOps?
Provides visibility into operations to anyone who has
access to your chat
Chat solutions like Slack are highly extensible, have
integrations with Lambda, and third party services, such as
PagerDuty, Jira, NewRelic, GitHub
Better and easier than IRC
Not behind a VPN
Makes operations easy from mobile devices
7. What are Chat Bots?
A computer program designs to simulate conversation with
human users, especially over the Internet
In this context, such bots allow you to improve how you
handle DevOps, making the process more efficient, visible,
and simple
13. 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
16. 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
18. 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 Tier
1 million requests and 400,000 GBs of compute
every month, every customer
19. 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
20. Using AWS Lambda
Programming 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
21. 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
22. 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
24. 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
25. 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
26. 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
27. Risks
Unauthorized access to your chat = bad things can happen
to your AWS account
Use Two-Factor Authentication!!!
Scope IAM policies appropriately
Don’t go overboard (too much info could be bad)
29. 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