chapter three

3 Build and Secure a Web Application the Serverless Way

 

This chapter covers:

  • Creating a serverless to-do list
  • Using DynamoDB, a serverless database
  • Implementing login the serverless way

In this chapter we will build upon the lessons of Chapter 2 to build our second, more capable Serverless AI system. Most programming texts use the canonical to-do list application as a teaching example. This book is no different in that regard. However this is certainly not your grandparents to-do list, this is the to-do list on steroids! The to-do list application that we will build in this chapter will start out simple enough as a familiar CRUD type application utilizing a cloud native database. After securing the application with a login and logout screen we will add natural language speech interfaces to record and transcribe text and to have the system tell us our daily schedule from our to-do list. Finally we will add a conversational interface to the system allowing us to interact entirely through natural speech and not the keyboard.

In this chapter we will build the serverless to-do list. We will add the AI features in Chapter 4 and as we will see, these can be built very rapidly by harnessing cloud AI services to do the heavy lifting.

3.1  The To Do List

3.2  Architecture

3.2.1  Web Application

3.2.2  Synchronous Services

3.2.3  Asynchronous Services

3.2.4  Communication Fabric

3.2.5  Utility Services

3.2.6  AI Services

3.2.7  Data Services

3.2.8  Development Support and Operational Support

3.3  Getting ready

3.3.1  Get the Code

3.4  Step 1 The Basic Application

3.4.1  Resources

3.4.2  To-do Service

3.4.3  Front End

3.4.4  Deploying Step 1

3.5  Step 2 Securing with Cognito

3.5.1  Get the Code

3.5.2  User Service

3.5.3  To-do service