Deploy Serverless Machine Learning Models to AWS Lambda
4.3 (98 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.
939 students enrolled

Deploy Serverless Machine Learning Models to AWS Lambda

Use Serverless Framework for fast deployment of different ML models to scalable and cost-effective AWS Lambda service.
4.3 (98 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.
939 students enrolled
Created by Milan Pavlović
Last updated 5/2020
English
English [Auto-generated]
Current price: $20.99 Original price: $29.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 7.5 hours on-demand video
  • 3 articles
  • 16 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Assignments
  • 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
  • Deploy regression, NLP and computer vision machine learning models to scalable AWS Lambda environment
  • How to effectively prepare scikit-learn, spaCy and Keras / Tensorflow frameworks for deployment
  • How to use basics of AWS and Serverless Framework
  • How to monitor usage and secure access to deployed ML models and their APIs
Course content
Expand all 62 lectures 07:45:22
+ Introduction
5 lectures 15:24

In the first lecture you will see a working web application whose backend side consists of various machine learning models deployed to AWS Lambda with the help of Serverless Framework. Whitin the next couple of course sections you will be able to build such systems too!

Preview 02:03

In this lecture I describe main concepts of serverless computing. After completing the lecture, you will  uderstand what does "serverless computing" mean in general.

Preview 02:30
What is Serverless Framework ?
01:50
Exposing ML Models through AWS Lambda
02:53
Basic Concepts from Introduction
5 questions
+ Setting up your system
13 lectures 01:05:57

In this lecture I will briefly explain why I decided to do the practical lectures on Linux.

Why Linux?
01:59
Pre-configured Virtual Machine Download
00:38
For Mac Users: Setup Instructions
00:29
Installing VirtualBox
02:36
Creating Ubuntu Virtual Machine
06:57
Initial Ubuntu Setup
10:27
Installing Miniconda
09:23
Installing Visual Studio Code
04:35
Installing pip3
05:20
What is Docker ?
03:06
Installing Docker
06:51
Installing Serverless Framework
07:54
Configuring Serverless
05:42
+ Program Code and Solutions Availability
1 lecture 00:23
Program Code and Solutions Availability
00:23
+ Hello World from Lambda
4 lectures 41:03
Serverless Create
08:32
Editing serverless.yml File
11:34
First Deployment
09:12
Supporting Services Overview
11:45
+ Deploying scikit-learn Regression Model
10 lectures 01:41:29

In this lecture I will show you the dataset which we will use for our model training and explain how you will use frontend code.

Intro to Dataset and Frontend Code
07:10

In this lesson we will create a virtual Python environment with miniconda and install required packages.

Creating Virtual Environment with Conda
07:07

In this lecture we will use simple data description functions from pandas package.

Simple Dataset Exploration
12:54

In this lecture we will train the SVR model in scikit-learn.

Training the Model
11:44

In this lecture we will discuss some model saving options.

Saving the Model
05:22

In this lecture we will create a serverless project and start editing handler.py file.

Creating Project and Handler Prototype
09:05

In this lecture we will code a function which will serve as Lambda and provide predictions from trained machine learning model.

Developing Prediction Function
15:02

After this lecture you will be introduced with options for testing lambda functions locally.

Testing Lambda Function Locally
11:49

In this lecture we will edit serverless.yml file.

Editing serverless.yml File
11:47

After this lecture you will be introduced with requirements.txt file, why it is used and how you can invoke your deployed Lambda function.

Creating requirements.txt and Deploying Model
09:29
This assignment provides you hand-on experience with creating Lambdas and deploying your own machine learning models trained with scikit-learn framework.
Deploy your own scikit-learn model
2 questions
+ Post Deployment Activities
5 lectures 47:40

After this lecture you will know what to pay attention on in CloudWatch logs.

Analyzing CloudWatch Reports
06:21

In this lecture I will show you a simple technique of keeping your Lambda functions warm.

Dealing With Cold Starts
14:01

In this lecture I'll give a more detailed overview about cold starts.

Important Notice About Scaling
03:13

After this lecture you will be able to create usage plans and API keys for your APIs.

Basics of Usage Plans and API Keys
14:27

In this lecture I will give an overview of costs components for AWS services used so far.

Check S3 storage and Costs
09:38
+ Deploying spaCy NLP Model
10 lectures 01:05:21
Intro to spaCy NLP framework
01:40
Creating Virtual Environment with Conda
06:43
spaCy Usage Example in Jupyter Notebook
13:28
Creating Project with Serverless
02:17
Coding Lambda Function
09:47
Unzipping Requirements in handler.py
04:01
Updating handler.py
01:49
Editing serverless.yml File
10:09
Adding requirements.txt and Local Testing
04:30
Deployment and Global Testing
10:57
In this task you will deploy the spaCy model like you did in this lecture, but you will use it for parts of speech tagging and dependency parsing. You will create an API endpoint which will return parts of speech and word dependencies for a given text.
Create PoS Tagging and Parsing Endpoint
1 question
+ Deploying Keras ResNet50 Model
14 lectures 02:08:04

In this lecture I’ll give you a brief overview of the architecture which you will build though the section to be able to deploy computer vision models such as ResNet50 or InceptionV3, to AWS Lambda.

Preview 01:52

In this lecture we will create a new conda environment for our keras example.

Creating Virtual Environment with Conda
04:51

In this lecture I will show you hot to download and use ResNet50 model with Keras framework.

ResNet50 Usage Example in Jupyter Notebook
14:34

In this lecture we will create two S3 buckets – first one for uploaded images, and the second for deep learning models.

Creating S3 Buckets
05:08
Updated Usage Example
17:04

In this lecture we will create project with serverless and start editing handler.py file.

Creating Project and Editing Handler File
10:19

In this video we will mainly finish editing handler.py file.

Finishing Handler File
12:32

In this lecture we will update our handler.py file and start editing serverless.yml file.

Updating Handler and Editing serverless.yml File
09:15

In this lecture we will finish editing serverless.yml file.

Finishing serverless.yml File
09:57

In this lecture we will test whether our Lambda function will work locally.

Testing Lambda Function Locally
06:36

In this lecture we will setup all necessary Python packages required for Lambda to work.

Setting Up Requirements
11:12

In this lecture we will finally deploy our function to AWS Lambda service.

Deploying and Global Testing
04:01

In this lecture we will setup our web page example to be able to upload an image to S3 bucket and obtain predictions from ResNet50 model.

Image Upload Settings on AWS
15:44

In this lecture we will test our web page example to obtain predictions from deployed ResNet50 model.

Visualizing Predictions on the Web Page
04:59
In this assignment you have to deploy the InceptionV3 computer vision deep learning model to AWS Lambda, as a Keras model. The procedure is very similar to deploying the ResNet50 model, which was demonstrated during this section.
Deploy InceptionV3 Keras Model
1 question
Requirements
  • Created AWS Account
  • Basic familiarity with Python and Machine Learning
  • Basic undestanding of Linux and Terminal
  • Basic understanding of JavaScript and REST APIs, but not strictly required
Description

In this course you will discover a very scalable, cost-effective and quick way of deploying various machine learning models to production by using principles of serverless computing. Once when you deploy your trained ML model to the cloud, the service provider (AWS in this course) will take care of managing server infrastructure, automated scaling, monitoring, security updating and logging.

You will use free AWS resources which are enough for going through the entire course. If you spend them, which is very unlikely, you will pay only for what you use.

By following course lectures, you will learn about Amazon Web Services, especially Lambda, API Gateway, S3, CloudWatch and others. You will be introduced with various real-life use cases which deploy different kinds of machine learning models, such as NLP, deep learning computer vision or regression models. We will use different ML frameworks - scikit-learn, spaCy, Keras / Tensorflow - and show how to prepare them for AWS Lambda. You will also be introduced with easy-to-use and effective Serverless Framework which makes Lambda creation and deployment very easy.

Although this course doesn't focus much on techniques for training and fine-tuning machine learning models, there will be some examples of training the model in Jupyter Notebook and usage of pre-trained models.

Who this course is for:
  • Beginner Machine Learning and DevOps Engineers, Data Scientists or Solution Architects
  • All Data Scientists and ML practitioners who need to deploy their trained ML models to production, quickly and at scale, without much bothering with infrastructure