Projects on AWS

Bots Just Got Better

with .NET and the AWS Toolkit for Visual Studio

Introduction: Build a .NET Bot

Follow step-by-step instructions to launch your first chatbot using Amazon Lex and other AWS services.


The .NET core chatbot application code allows you to order flowers using a Chatbot powered by Amazon Lex, AWS Lambda, and Amazon Cognito Identity. This application can be deployed from AWS CodeCommit or GitHub to a CI/CD pipeline using AWS Developer Tools like AWS CodePipeline, AWS CodeBuild, and AWS CodeDeploy.

The chatbot uses Amazon Lex to build a text based conversational interface for a web application. AWS Lambda is used as code hooks for this bot to validate user responses. You can also create AWS Lambda functions to perform initialization and fulfillment, or both, in your Lex intent configuration. A blueprint for this Lex bot will be provided and preconfigured for you in Module 2.

The chatbot uses Amazon Cognito Identity to control user access to the AWS resources supporting your chatbot. The bot is deployed on Amazon EC2 running Windows or Linux using AWS Developer Tools for Continuous Integration and Delivery.

To start using the bot, a user would simply type "I want to order flowers," "order flowers," or something similar. The user can then chose the desired flower type, the date, and time of pickup.

Application Architecture

The application architecture uses AWS Lambda, Amazon Lex, and Amazon Cognito to communicate with a .NET application deployed on an EC2 instance as pictured below:

chatbot architecture diagram

 AWS Experience


 Time to Complete

1.5 hours

 Cost to Complete

Each service used in this architecture is eligible for the AWS Free Tier. If you are outside the usage limits of the Free Tier, completing this learning path will cost you less than $0.25*.

 Tutorial Prereqs

To complete this learning path, you will need:
✓ An AWS Account**
✓ Visual Studio


*This estimate assumes you follow the recommended configurations throughout the tutorial and terminate all resources within 24 hours.

**Accounts that have been created within the last 24 hours might not yet have access to the resources required for this learning.

Try It Before You Build It


This workshop is broken up into five modules. You must complete each module before proceeding to the next.

  1. Amazon Lex Bot Creation
  2. AWS Lambda Code Hook Creation
  3. Amazon Cognito Setup
  4. Clone Github Repo
  5. Deployment & Cleanup

Get started by first creating an Amazon Lex Bot.