Build a Serverless App with AWS Lambda - Hands On!
4.5 (1,340 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
11,348 students enrolled

Build a Serverless App with AWS Lambda - Hands On!

Create a chat web app using Amazon Web Services - Lambda, DynamoDB, API Gateway, S3, Cognito, CloudFront, and more.
4.5 (1,340 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
11,348 students enrolled
Last updated 3/2020
English
English [Auto], Portuguese [Auto], 1 more
  • Spanish [Auto]
Current price: $34.99 Original price: $49.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 7.5 hours on-demand video
  • 2 articles
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Build a chat application entirely with AWS services, and no stand-alone servers at all
  • Architect and design serverless applications
  • Serve static resources to browsers using AWS's S3 (Simple Storage Service)
  • Use Javascript to dynamically modify web pages
  • Manage permissions and access policies using IAM (Identity and Access Management)
  • Manipulate and vend data in the cloud using AWS Lambda
  • Use CORS to manage client-side security in serverless apps
  • Store and retrieve data with DynamoDB
  • Model API's and create SDK's with API Gateway
  • Create a user login system with Cognito
  • Speed up your web app with a CloudFront CDN
Course content
Expand all 60 lectures 07:22:19
+ Introduction
3 lectures 32:42

Course overview and demo of the chat application

Preview 17:40

Create an AWS account, an S3 bucket, upload a website, and view it in your browser

Preview 12:52
+ Static Chat Application with S3
7 lectures 51:45

Buckets, paths, and static website hosting

Preview 10:06

We'll review all of the static HTML, CSS, and Javascript that make up our chat application so far.

Walkthrough of demo site
06:13

For now, we'll upload some static chat data into S3 in JSON format so we have something to display.

Adding static data to the website
05:17

This course uses Javascript, so let's do a quick crash course on the basics of the language.

JavaScript Syntax Basics
07:44

How does Javascript execute in parallel to speed up your website, without dealing with all the nastiness of multi-threading and concurrency?

JavaScript Parallelism
05:30

Let's dynamically modify our chat pages to include the static chat data we're vending from S3.

Accessing static data from javascript
11:44

We'll walk through the previous lecture's challenge of adding a new message and a new conversation to our chats.

Exercise 1 solutions
05:11
+ Creating an API
12 lectures 01:04:14

Learn how Lambda allows you to execute snippets of code without running a dedicated server.

Preview 06:12

Identity and Access Management lets you secure your services and the services they have access to.

Introduction to IAM and policies
04:24

Let's give our Lambda function the permissions it needs to read our data from S3.

Creating a policy for the Lambda function
05:56

Let's dissect our first Lambda function, and how it works.

Code walkthrough of the first Lambda function
08:46

Learn how to create a test case for our Lambda function, and run it from within the AWS console.

Running the lambda function with test data
04:17

Triggers are what cause your Lambda function to be executed. Let's cover the various ways in which that can work.

Lambda triggers
04:06

Let's set up the API Gateway in Proxy mode to trigger our Lambda function when an API is called from our client.

Adding an API Gateway trigger to the function
04:18

Learn how Cross-Origin Resource Sharing (CORS) gets around browser security to allow you to call web services from your page.

Preview 07:25

Let's modify our client-side code to hit the API Gateway and Lambda, instead of S3 directly.

Calling the API from the website
06:07

We'll walk through the previous lecture's challenge to break CORS support intentionally and see what happens, and to lock down our API to only be accessible to your S3 bucket.

CORS Activity Solution
02:35

Let's modify our app to retrieve entire conversations using the API Gateway.

Retrieving a conversation with the API
06:55

We'll walk through our solution to the previous lecture's challenge of writing test cases for failure modes.

Failure test activity solution
03:13
+ Use DynamoDB for storage
9 lectures 01:13:50

Let's cover DynamoDB from a high level, and learn how it might help us store our chat data more efficiently.

Preview 09:29

Why use DynamoDB instead of S3? There are pros and cons to each, but DynamoDB is the clear winner for us.

DynamoDB vs. S3
02:57

Create the tables we need for chat conversations and messages in DynamoDB

Create DynamoDB tables
04:18

Populate our DynamoDB tables with some sample chats for us to test with.

Create some sample data in DynamoDB
06:19

Grant our Lambda function the necessary permissions via IAM to access our DynamoDB tables instead of S3.

Update Lambda policy to access DynamoDB tables
04:44

Modify and test our application to read chat conversations from DynamoDB instead of S3.

Read a conversation from Dynamo DB
12:39

Modify and test our application to read the conversation list from DynamoDB instead of S3.

Read conversation list from DynamoDB
12:16

Modify our chat application to allow users to enter new chat messages and store them in DynamoDB where others can see them!

Write new messages to DynamoDB
14:53

We'll walk through our solution to the challenge of handling invalid HTTP methods, and removing the now unnecessary access to S3 from our Lambda functions.

Exercise Solution
06:15
+ Break up the monolith
9 lectures 01:11:38

Why go through the trouble of breaking up our monolithic Lambda function? Let's explain.

Overview of why having only one Lambda function can create problems
05:44

What are resources and methods in the API Gateway, and how are they used?

API Gateway overview - Resources and Methods
09:52

What models are in the API Gateway, and how to use them.

API Gateway overview - Models
03:48

Dissecting the request flow diagram in the API Gateway.

API Gateway overview - Request Flow
06:10

Let's go hands on and define our API for our chat application in the API Gateway, not in proxy mode.

Create API structure in API Gateway
09:44

Let's split up our Lambda function into individual ones for reading and writing messages.

Lambda functions for reading and writing messages
13:02

We'll cover stages in the API Gateway and how they are used.

API Gateway stages
03:25

With a well defined API in the API Gateway, you can automatically generate client code for Javascript, and for pretty much any other client using the Swagger definition it creates for you.

Preview 13:07

We'll tackle the previous lecture's challenge of removing the hardcoded "Student" user name from our Lambda functions, and providing it as an event parameter instead.

Remove hard-coded user names from Lambda
06:46
+ Add Identity to the app
12 lectures 01:30:49

Let's cover the various components of Cognito, which we'll use for user account management.

Preview 07:36

Let's walk through Cognito in the console, and set up the user pool for our chat application.

Create a user pool
08:12

Next we need to wire things up for listing users through Lambda with an associated IAM policy and role, and through the API Gateway.

List Users in the API
09:33

Let's add the front-end code for listing users - and dive into how to debug things when things don't work.

List Users on the site
11:00

Let's wire up the API and front end for creating a new conversation.

Create a new conversation
11:06

Let's create a working sign up page so new users can create accounts.

Create sign up page
10:53

Now we need to wire up a page so users can enter the authentication code they received via email, or request it to be re-sent.

Create verification page
04:56

Now that we can sign in and confirm users, let's actually sign them in and tie their identity into the rest of the app.

Add login and logout
05:49

We need to reconfigure the API Gateway to use an Authorizer, and modify our input mappings to use the new authenticated user.

Add a Cognito authorizer to the API Gateway
08:37

We have sign in and authorization on the API, and now we just need to link the two together! 

Pass user token to the API
04:34
Heads up!
00:09

In the last lecture, we challenged you to fix the problem of starting chats with yourself, and to ensure you can't see chats that you're not involved in. Let's look at our solution.

Mapping unauthorized responses to HTTP status codes
08:24
+ Optimization and Preparing for Production
6 lectures 46:55

You don't want your changes to "go live" immediately. Lambda versioning ensures a known good version of what your code is what's live. We'll also use Canary to divide traffic between different deployments, create and use a test stage and promote it to production, and use version aliases to simplify the configuration of Lambda.

Preview 14:21

Let's see how Stage Variables can let us maintain separate databases, or resources in general, between different stages so they don't pollute each other.

Using stage variables
06:25

Let's talk about how CloudFront, AWS's content delivery network, works and why it's important.

CloudFront overview
04:17

Let's walk through setting up CloudFront to accelerate the delivery of our static resources in S3.

Setting up a CloudFront CDN
08:35

We'll tour the various monitoring available in AWS for our application, and practice setting up an alarm.

Monitoring
07:45

Finally, let's walk through how you would go about associating your own custom domain name with this application. We'll also show you how to associate a custom domain name with your API layer, if that's something you want to expose more widely.

Custom domains
05:32
+ You Made It! Where to go from here.
2 lectures 10:25

There's so much more learn about AWS! Here are some pointers for continuing your exploration.

More to Explore...
09:48
Bonus Lecture: More courses to explore!
00:37
Requirements
  • You'll need a desktop PC with Internet access
  • Basic familiarity with HTML, Javascript, and AJAX will be helpful
Description

Immerse yourself in Amazon Web Services (AWS) with this hands-on, project-based course - and truly internalize some highly valuable skills in the world of technology. We'll walk you through building your own chat website using nothing but AWS services - and no standalone services or server instances at all! 

Building a "serverless app" using AWS and its Lambda service is a great introduction to the core services AWS offers. As you create your chat application, you'll learn and use the following AWS services:

  • S3 (Simple Storage Service) - For storing static HTML and vending it to your users' browsers
  • Lambda - For executing logic in the cloud for storing and retrieving data in your application
  • IAM (Identity and Access Management) - For securing access to your services
  • API Gateway - For presenting a well-modeled API to your clients and automatically generating client-side code to communicate with it
  • DynamoDB - For quickly storing and retrieving data at scale
  • Cognito - For managing users, account creation, and logins securely
  • CloudFront - For accelerating the delivery of your site to end users with a CDN

We'll tie it all together by learning and practicing Javascript, and we'll learn about CORS to grant browsers the permissions they need to run a serverless application.

Even if you're familiar with AWS, you'll learn valuable techniques on how to build a fully functional, dynamic website without maintaining any servers at all - not even via EC2!

Your highly experienced guides through this project are Frank Kane, formerly a senior manager at Amazon, and Brian Tajuddin, a principal engineer also formerly working at Amazon. You'll be learning AWS from people who were there when it was being created. You'll join over 140,000 other students of the Sundog Education team who have leveled up their careers with hot technical skills.

As an added bonus, you'll be offered membership in a closed Facebook Group for students of this course, where you can continue to collaborate with each other even after you've finished it.

Although this course isn't targeting any specific AWS certification exam, you'll leave it with a great foundation of AWS knowledge that will begin to prepare you for them.

Who this course is for:
  • Technologists curious about Amazon Web Services and how to build web applications entirely in the cloud
  • People seeking basic AWS skills as a start in working toward certifications
  • People who learn best by doing, with a concrete example.
  • Engineers tasked with building a web app who want to minimize ongoing maintenance