<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nitin Goswami on Medium]]></title>
        <description><![CDATA[Stories by Nitin Goswami on Medium]]></description>
        <link>https://medium.com/@simplynitin_22387?source=rss-b0ed977aac57------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8AzN7DJKgPUWlUSyUpmP2g.jpeg</url>
            <title>Stories by Nitin Goswami on Medium</title>
            <link>https://medium.com/@simplynitin_22387?source=rss-b0ed977aac57------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:58:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@simplynitin_22387/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Yeah! This Bot is Awesome! Disruptive enough?]]></title>
            <link>https://medium.com/@simplynitin_22387/yeah-this-bot-is-awesome-disruptive-enough-780c4b02a6e2?source=rss-b0ed977aac57------2</link>
            <guid isPermaLink="false">https://medium.com/p/780c4b02a6e2</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[slackbot]]></category>
            <category><![CDATA[aws-lex]]></category>
            <dc:creator><![CDATA[Nitin Goswami]]></dc:creator>
            <pubDate>Thu, 28 Feb 2019 04:38:59 GMT</pubDate>
            <atom:updated>2019-02-28T04:43:47.030Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Disclaimer: This blog is not a build-the-bot tutorial. But eventually you would end up building one, once you read it through.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*N1dkD9k-Rb8PphJH" /></figure><p>Big ideas should be the obvious one. Easiest to think about, and should stay long. The invention is not disruptive, Customer adoption is disruptive. If your product and tech are so disruptive but your customer did not care at all, it’s not at all disruptive. ~ Jeff Bezos</p><p>Simple is Harder than complex. It’s way too hard to build something that’s so simple. It’s easy to come up with the things we “have to do”. It’s harder to come up with the things we have to “Not Do”. ~ Steve Jobs</p><p>There are two types of approaches exist:</p><ul><li>One that solves a very specific and very complex problem but impacts relatively few people. Think of an algorithmic trading application</li><li>The second one is the one that solves a very generic and very simple problem but impacts masses. Think of Uber, everyone needs a ride, no big deal right?</li></ul><h3>Conversational Bots:</h3><p>Productivity is a measure of success. Automation is a tool to increase productivity. Before this whole Internet-of-things age, People used to be smart and watches used to be dumb. Intelligence was real, and learning was human.</p><p>Now thanks to Artificial Intelligence and Machine Learning, Smartness of a human has been automated and have fed into a watches that becomes your smartwatch. It’s fascinating to see how technology has advanced in a short time span.</p><p>Bots have become a more common approach to automate processes to reduce human intervention. Bots are not dumb anymore, organizations are using bots to automate complex workflows and processes ranging from paying property taxes, locating HR policies, directing a customer to the correct department and what not.</p><blockquote><strong>Technology Selection:</strong> Time-to-market is the key to success. Selection of right technology elevates your chance of winning the market competition. Technology is advancing rapidly. Solutions are in plenty, problems are less. If you got a problem, sure there is a solution.</blockquote><h3>Problem: How to build a “conversational chat bot” that can find the birthday of my friends and family?</h3><p>Sounds like “NO BIG DEAL”?? Yes, Absolutely no big deal. That’s exactly what SaaS, PaaS, IaaS providers keep in mind while building a solution. If it’s not easy to learn and adapt, it’s not going to work.</p><p>Now since we have a problem, let’s try and find what technology has to offer to solve it with the least amount of efforts. The first step to success is to make a smart selection of tools and technologies according to your level of comfort.</p><h3><strong>Tech Stack: Slack, AWS Lex, AWS Lambda, Python</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d8j5ef4wB9df5Fm-" /></figure><p><strong>Slack</strong>: According to the product’s marketing tagline, it’s <em>“</em><strong><em>The collaboration hub that moves the work forward”.</em> </strong>In plain English it’s an app being used by teams to chat, share files, video conference &amp; last but not the least share “Giphy” — things they call “Collaboration”. I am a big fan of Slack for the simple reason that it’s slick, it’s bundled with loads of features and also has a rich Application Directory where you can find thousands of apps that can integrate with various external tools.</p><p><strong>Amazon Lex:</strong> is an AWS service for building conversational interfaces for applications using voice and text. With Amazon Lex, the same conversational engine that powers Amazon Alexa is now available to any developer, enabling you to build sophisticated, natural language chatbots into your new and existing applications. Amazon Lex provides the deep functionality and flexibility of natural language understanding (NLU) and automatic speech recognition (ASR) so you can build highly engaging user experiences with lifelike, conversational interactions, and create new categories of products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*iSb7o1iz4rJZAeIUYB4ESQ.png" /></figure><p><strong>AWS Lambda:</strong> lets you run code without provisioning or managing servers. You pay only for the compute time you consume — there is no charge when your code is not running.</p><p>With Lambda, you can run code for virtually any type of application or back-end service — all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.</p><p>AWS Lambda supports .NET, Go, Java, Node, Python and Ruby. We will be using python to build back-end code hook to attach to Lex chatbot.</p><p><strong>Python: </strong>Python is a programming language that lets you work more quickly and integrate your systems more effectively.</p><h3>Get Started: You are just 3 steps away</h3><ul><li>Define conversation in Lex (Utterance, Intent, Slots, Response)</li><li>Build back-end service in python-lambda</li><li>Integrate it with Slack</li></ul><p><strong>Pre-requisite:</strong></p><ul><li>AWS Account and Console Access</li><li>Basic Python understanding</li><li>Slack App</li></ul><p><strong>Architecture: </strong>The architecture is very simple, a user interacts with the slack app by asking one of the set statements capable of identifying the user’s intention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mn0Mcz7Zg-VHtKmzD3_pQw.png" /><figcaption>A simple sequence of activities of a chat application</figcaption></figure><h3>Define conversation in Lex:</h3><p>Wait! Don’t freak out. It is not as intimidating as it looks. Let’s quickly familiarize with Lex Lingo…</p><ul><li><strong>Bot</strong> — A bot performs automated tasks such as ordering a pizza, booking a hotel, ordering flowers, and so on. Amazon Lex bots can understand user input provided with text or speech and converse in the natural language. You can create Lambda functions and add them as code hooks in your intent configuration to perform user data validation and fulfillment tasks.</li><li><strong>Intent</strong> — An intent represents an action that the user wants to perform. You create a bot to support one or more related intents. For example, you might create a bot that orders pizza and drinks. For each intent, you provide the following required information:</li><li><strong>Intent name</strong>– A descriptive name for the intent. For example, <strong>OrderPizza</strong>.</li><li><strong>Sample utterances</strong> — How a user might convey the intent. For example, a user might say “Can I order a pizza please” or “I want to order a pizza”.</li><li><strong>How to fulfill the intent</strong> — How you want to fulfill the intent after the user provides the necessary information (for example, place order with a local pizza shop). We recommend that you create a Lambda function to fulfill the intent.</li><li><strong>Slot</strong> — An intent can require zero or more slots or parameters. You add slots as part of the intent configuration. At runtime, Amazon Lex prompts the user for specific slot values. The user must provide values for all <em>required</em> slots before Amazon Lex can fulfill the intent.</li><li><strong>Slot type</strong> — Each slot has a type. You can create your custom slot types or use built-in slot types. For example, you might create and use the following slot types for the OrderPizza intent:</li><li>Size — With enumeration values Small, Medium, and Large.</li><li>Crust — With enumeration values Thick and Thin.</li><li>Amazon Lex also provides built-in slot types. For example, AMAZON.NUMBER is a built-in slot type that you can use for the number of pizzas ordered. For more information,</li></ul><h3><strong>Login to AWS Console and Open Lex ( Find in Service Manager ) Choose “Custom bot”</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vi_bgJWydLQOCJhi5-umDQ.png" /></figure><ul><li><strong>Create Intent: Call it FindBirthday</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*so839s7DuIzWm8eta0qYXg.png" /></figure><ul><li><strong>Define utterance: User will use these utterances to clear his/her intent</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RR9jYK21qCOeuY8zqy-TmQ.png" /></figure><ul><li><strong>Create Slot Type: Create two slot types 1) FirstName 2) LastName. You can also specify valid options</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PsZ2nTV2MK9TjpmDX-4g7g.png" /></figure><ul><li><strong>Create two Slots: One to capture FirstName and second to capture LastName. Choose appropriate Slot types from drop down.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jB2jBIBntzx0SQBoH7Qv7g.png" /></figure><ul><li><strong>Fulfillment: Hook Lambda Function that we are going to define in the next step. (Before this step, follow the step to code the lambda function and come back here once the back-end is ready)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HuSHvRjTp_DYiuC0fmKsyw.png" /></figure><h3>Build back-end service in python-lambda</h3><ul><li><strong>Login to AWS Console and go to Lambda (Find in Service Manager). Choose Author from scratch. </strong><em>(note. There are few blueprints available for you to get started)</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xVo37FIMJkPdvjsxHE1ANQ.png" /></figure><ul><li><strong>Pull down the source code from my GitHub repository. You can simply use BirthdayFinderFunction.py as your lambda.</strong></li></ul><p><a href="https://github.com/atreyanitin/aws-slackapp-birthdayfinder">atreyanitin/aws-slackapp-birthdayfinder</a></p><ul><li><strong>S3 bucket to store json file what contains birthdays (Ignore): </strong>For the sake of keeping things simple, I decided to locally store all the birthdays in a local python dictionary. For more serious cases, it’s a good idea to store such information in an external data store. There are many options — Amazon S3 and DynamoDB are two of the favorite ones.</li></ul><h3>Slack API Integration</h3><ul><li>Before you could build an app, you would need an existing workspace or create a new workspace.</li><li>Once you have a workspace, follow the easy steps. The document is self-explanatory. Refer the link shared below.</li></ul><p><a href="https://docs.aws.amazon.com/lex/latest/dg/slack-bot-assoc-create-app.html">Step 3: Create a Slack Application - Amazon Lex</a></p><ul><li>New Slack App gives you App Credentials that you need to copy in Channel settings in AWS Lex console while setting up Slack.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XGFOnhOOisE7cqlD46QANA.png" /></figure><ul><li>Lex offers 4 platforms to integrate your Lex Bot. This is the form you need to fill with the information you have. Follow the documentation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Sv6-bH9Kzk_v0fq2qiEhQ.png" /></figure><ul><li>Your Slack App should be Up and Running as soon as you hit “Distribute”</li></ul><h3>THE DEMO: Slack Bot in Action</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fcxi0KICH7DU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dcxi0KICH7DU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fcxi0KICH7DU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1c3d0cf723a551f2eea38037aa5a555/href">https://medium.com/media/c1c3d0cf723a551f2eea38037aa5a555/href</a></iframe><blockquote><strong>Conclusion</strong>: The sole idea behind writing this blog is to share my experience with AWS and real life use cases of Bots. I hope after reading this blog, you will feel encouraged to try out these technologies. I would encourage you to think of use cases that are relavent to you. Not necessarily from work, any thing as simple as BirthdayFinder can be fun once build out by your bare hands.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=780c4b02a6e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>