Demystifying Serverless

Hands-on Workshop: Serverless Restaurant Rating App

Abstract:
Get hands-on experience with AWS and serverless applications in this workshop. You'll deploy a simple web application that enables users to rate restaurants using services like AWS Lambda, Amazon API Gateway, Amazon S3, Amazon DynamoDB and Amazon Cognito. With the knowledge from the workshop, you can build and deploy your own serverless applications using these services for common use cases like web applications, analytics, and more.

Application - Technical Description:
The application will present users with an HTML & JS based user interface for rating restaurant. The interface on the backend with a RESTful web service will submit the request and update the database. The application will also provide facilities for users to register into the application before rating.

The application architecture uses S3 hosts static web resources including HTML, CSS, JavaScript, and image files which are loaded in the user's browser. JavaScript executed in the browser sends and receives data from a backend API built using Lambda and API Gateway. Amazon Cognito provides user management and authentication functions to secure the backend API. Finally, DynamoDB provides a persistence layer where data can be stored by the API's Lambda function.

Pre-requisites:
AWS Account: In order to complete this workshop you'll need an AWS Account with access to create AWS IAM, S3, DynamoDB, Lambda, API Gateway and Cognito resources. All of the resources you will launch as part of this workshop are eligible for the AWS free tier if your account is less than 12 months old. See the AWS Free Tier page for more details.

Essential JavaScript, HTML/CSS & Python knowledge: The front-end used JS and HTML/CSS and the backend code is written in Python; hence working knowledge is needed on these languages for this workshop.

Agenda

Session 1: Getting Started with Serverless Development
Essentials of serverless development
Introduction to the essential AWS services used in this workshop and how they relate to each other: AWS Lambda, Amazon API Gateway, Amazon S3, Amazon DynamoDB and Amazon Cognito.
Hands-on: Clone the GitHub repo for the "Tomato Restaurant Rating” application
Session 2: Static Website Hosting
How to use S3 for static website hosting
Hands-on: Create an S3 bucket, upload content, add a bucket policy to allow public reads, and enable website hosting; validate the hosted website
Session 3: User Management
How to perform user authentication and registration with Amazon Cognito User Pools
Hands-on: Create an Amazon Cognito user pool, add an application client, updating the Config.js file in your website bucket, and validate the implementation.
Lunch break
Session 4: Serverless Service Backend
How to use AWS Lambda, and Amazon DynamoDB to build a backend process for handling requests from your web application.
Hands-on: Create DynamoDB table, create an IAM role for the lambda and step functions, create lambdas for handing requests; validate implementation
Session 5: RESTful APIs with AWS Lambda and Amazon API Gateway
How to use API Gateway to expose the created lambdas as RESTful APIs.
Hands-on: Create a new REST API, create a Cognito User Pools Authorizer, create a new resource and method, deploy your API, update the website config; validate the implementation.
Session 6: Putting things together and next steps
How to test the implementation
How to monitor the application, logging, debugging, etc
Wrap-up and key takeaways

Image placeholder

Srushith - Co-Founder & Head of Engineering at KonfHub

Building KonfHub, a one stop platform for technical conferences on AWS stack, primarily using serverless and other associated services. Got the first taste of Serverless by participating in the “AWS Chatbot Challenge” and fell instantly in love with the technology and the unparalleled passion for Lambdas henceforth began. Regularly speaking at conferences and meetups in the serverless community and sharing knowledge, production experiences and real life challenges. Started the very first serverless focused meetup group in Bangalore, contributing, presenting and encouraging young passionate members to pursue the same which currently blossoms with around 4,800 members!