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.05 (290 reviews)
Udemy
platform
English
language
Data Science
category
instructor
Deploy Serverless Machine Learning Models to AWS Lambda
2,575
students
8 hours
content
Dec 2020
last update
$109.99
regular price

What you will 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

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.

Content

Introduction

Introduction: what you will build during the course
What is Serverless Computing ?
What is AWS Lambda ?
What is Serverless Framework ?
Exposing ML Models through AWS Lambda
Basic Concepts from Introduction

Setting up your system

Why Linux?
Pre-configured Virtual Machine Download
For Mac Users: Setup Instructions
Installing VirtualBox
Creating Ubuntu Virtual Machine
Initial Ubuntu Setup
Installing Miniconda
Installing Visual Studio Code
Installing pip3
What is Docker ?
Installing Docker
Installing Serverless Framework
Configuring Serverless

Program Code and Solutions Availability

Program Code and Solutions Availability

Hello World from Lambda

Serverless Create
Editing serverless.yml File
First Deployment
Supporting Services Overview

Deploying scikit-learn Regression Model

Intro to Dataset and Frontend Code
Creating Virtual Environment with Conda
Simple Dataset Exploration
Training the Model
Saving the Model
Creating Project and Handler Prototype
Developing Prediction Function
Testing Lambda Function Locally
Editing serverless.yml File
Creating requirements.txt and Deploying Model

Post Deployment Activities

Analyzing CloudWatch Reports
Dealing With Cold Starts
Important Notice About Scaling
Basics of Usage Plans and API Keys
Check S3 storage and Costs

Deploying spaCy NLP Model

Intro to spaCy NLP framework
Creating Virtual Environment with Conda
spaCy Usage Example in Jupyter Notebook
Creating Project with Serverless
Coding Lambda Function
Unzipping Requirements in handler.py
Updating handler.py
Editing serverless.yml File
Adding requirements.txt and Local Testing
Deployment and Global Testing

Deploying Keras ResNet50 Model

Solution Architecture Overview
Creating Virtual Environment with Conda
ResNet50 Usage Example in Jupyter Notebook
Creating S3 Buckets
Updated Usage Example
Creating Project and Editing Handler File
Finishing Handler File
Updating Handler and Editing serverless.yml File
Finishing serverless.yml File
Testing Lambda Function Locally
Setting Up Requirements
Deploying and Global Testing
Image Upload Settings on AWS
Visualizing Predictions on the Web Page

Reviews

Jeet
December 31, 2021
This course is my starter course of AWS lambda. I was unaware about lambda and it's wonderful services, Now I know about lambda, Docker and many more things along the course. Thank you for preparing such an awesome course starting from beginning to advance. I really learn a lot from it. Thank you!
Paul
November 6, 2021
serverless.yaml config seem a bit outdated, I had to tweak the configuration myself a little to make everything work correctly. Added my answer to corresponding QA ticket, where course author just replied with first google link to similar question from another guy.
Dmytro
June 9, 2021
I like the course. The explanations are clear and helpful. I think the lecturer did a very good job. Highly recommend it!
Edgar
May 27, 2021
Seems quite outdated (no updates since 2 years ago).. all the examples have implementation issues, the Q&A section is not updated and some questions were left without an answer. The instructor doesn't sound very knowledgeable and some of his comments on the Q&A can confirm this.
Francisco
April 1, 2021
A good introductory course to using AWS Lamba. There are some compatibility errors and from checking the answers, the presenter excuses in the fact that using the same library version might solve the problem. An update of the serverless framework version and packages should be done.
Hooi
March 23, 2021
The course is very practical, unluckily it is not updated. I created a github repo with the following value-added changes and more:- 1. Using Python 3.8 instead of Python 3.6 in the course and latest version of libraries. 2. To deploy all examples. you only need git, no other installations are required as all of them setup with continuous deployment pipeline using Github Actions. 3. All examples are setup with "warm start" and request throttling limit to 1 to protect your account and your wallet. You can find out more from the blog post at http://limcheekin.blogspot.com/2021/03/deploy-serverless-machine-learning.html
Eugene
February 12, 2021
Generally a good introduction to serverless deployment on AWS Lambda, with a great code-along flow to the chapters to implement a prediction model. However, code and packages used are slightly dated, considering how fast this domain is moving forward in terms of updates (Packages, as well as the AWS platform itself). SpaCy project was undeployable because at time of this review, serverless was already at 2.23.0, compared to the version 1.38.0 that was used for the instructional videos, which resulted in many seemingly unsolvable errors. The errors disappeared after I downgraded serverless, which meant that I spent quite a bit of time debugging code that was already good in the first place. For anybody attempting to follow the code-work in this course, remember that every time you see a package being stated in the command to be executed, if it doesn't have a specific version being specified, it would be prudent on your part to watch the video a little more, see version that Milan has used, then modify the command to use that specific package version via the '==' operator. Technical issues aside, I feel that this course is a great hands-on primer to serverless deployment on AWS platform, and has motivated me to explore this subject further. Thank you Milan for sharing your knowledge on this subject.
Donné
December 21, 2020
Great course very hands on which is a lot more useful. Would have liked to have access to the code repo though.
Hassan
May 17, 2020
Concepts were clear. But, there were some issues with module updates. Also holistic overview of an end-end ML project was missing.
Larry
July 1, 2019
I'm not done with course yet, but everything that I've seen so far is pretty good. Things that are most noticeable are: a. Step-by-step walk-thru of creating the lab/environment - this usually is a pain due to discrepancies in software versions and operating systems. b. Learning by doing - there are many hands-on courses but this on is special because the instructor ties everything together. For example, most courses about training and deploying ML model and they just left you hanging there to figure out how to productionize it. Here, the instructor provides you a sample application that you integrate with your trained ML model. You can see the fruit of you works once you're done with the lab. c. The course is not for beginner because you need to know something about AI/ML, AWS and basic operating systems. If you already have those skills under your belt, this course help you put everything together almost end-to-end. For future enhancement, I hope to see solutions for the exercises and integration with Amazon SageMaker since this course is using the AWS platform. Without examples on SageMaker, I feel like the course is incomplete.

Charts

Price

Deploy Serverless Machine Learning Models to AWS Lambda - Price chart

Rating

Deploy Serverless Machine Learning Models to AWS Lambda - Ratings chart

Enrollment distribution

Deploy Serverless Machine Learning Models to AWS Lambda - Distribution chart
2094130
udemy ID
12/18/2018
course created date
8/22/2020
course indexed date
Bot
course submited by