Serverless Deep Learning with TensorFlow and AWS Lambda
One of the main problems with deep learning models is finding the right way to deploy them within the company’s IT infrastructure. Serverless architecture changes the rules of the game—instead of thinking about cluster management, scalability, and query processing, it allows us to focus specifically on training the model. This course prepares you to use your own custom-trained models with AWS Lambda to achieve a simplified serverless computing approach without spending much time and money. You will use AWS services to deploy TensorFlow models without spending hours training them. You’ll learn to deploy with serverless infrastructures, create APIs, process pipelines, and more. By the end of the course, you will have implemented a project that demonstrates using AWS Lambda to serve TensorFlow models.
About the Author
Rustem Feyzkhanov is a data scientist at Astro Digital and works on creating analytical models on top of satellite imagery. He is also passionate about serverless infrastructures and AI deployment on them. He has ported several packages on AWS Lambda, ranging from TensorFlow/Keras/sklearn for ML to PhantomJS/Selenium/WRK for web scraping. One of these apps was featured on the AWS serverless repo home page.
Beginning with Serverless and Motivation for Serverless Deep Learning
This video provides an overview of the entire course.
Serverless is a hot topic and IT professionals would like to learn more on it and why it became popular for production and pet projects.
• Explore different ways of deployment backend applications
• Understand how AWS Lambda works
• Know how AWS Lambda can work with other AWS services
There are a number of challenges in data science process which can be successfully solved by serverless architecture. This lecture will show how you can benefit from using serverless for deep learning projects.
• See what data science process looks like and what are the main challenges
• Analyze advantages of using serverless approach for deep learning applications
• Compare traditional versus serverless approach for deploying deep learning models
It may be hard to understand whether serverless deep learning is right for you. This lecture will cover cases where serverless deep learning works and where it doesn’t work.
• Explore cases where serverless deep learning works
• Understand cases where serverless deep learning doesn’t work
Example projects which will help to become familiar with how serverless deep learning works and how to integrated it with other AWS services.
• Understand deep learning API project
• Look at the deep learning queue project
• Perceive deep learning pipeline project
Start Deploying with AWS Lambda Functions
To deploy applications using AWS lambda we need to get better understanding of how it works and how deployment looks like.
• Understand how lambda deployment package looks like
• Grasp how lambda code looks like
• Learn pros, cons and limitations of AWS Lambda
To use AWS Lambda we need to create AWS account and create user with right role and credentials so we will be able to deploy AWS Lambda from command line.
• Create AWS account
• Configure AWS user account with right permissions and learn how to get credentials
Creating “Hello world” application through AWS Lambda helps to become familiar with interface.
• Understand different ways of starting AWS Lambda from UI
• Analyze different ways of uploading Lambda package to AWS Lambda
• Create "Hello world" application
Serverless framework allows one of the easiest ways of deploying AWS Lambda form command line and is the usual way of deploying it in production.
• Acquire knowledge that why we need framework for deploying serverless applications
• Learn advantages of serverless framework
• Add task Docker to the Build Pipeline
Installing prerequisites and actual framework is very important for projects which we will look through during the course.
• Install prerequisites for serverless framework
• Install serverless framework
Creating first application with serverless framework to get familiar with framework.
• Understand how serverless framework deployment process looks like
• Analyze how the serverless framework configuration file looks like
• Deploy using serverless framework
Start Deploying TensorFlow Models
Deep learning and neural networks are extremely popular right now for a lot of people it may be hard to understand why they are popular right now and how they can be used.
• Learn deterministic and machine learning approach for solving problems
• Understand how pre-trained deep learning models can be useful
• Explore TensorFlow framework and why it is useful
Creating first deep learning application with TensorFlow to show how to train, import and export the model.
• Understand how training, deployment, exporting and importing models works with TensorFlow
• Run TensorFlow code for MNIST
• Click on Data Explorer section to setup the database within the instance
To use pre-trained TensorFlow models, you need to know where to get them. This lesson show where you can get pre-trained TensorFlow models.
• Explore description and usage of models from TensorFlow main website
• Understand description and usage of models from TensorFlow hub website
• Learn description and usage of models from GitHub
Creating deep learning application with pre-trained TensorFlow model for image captioning to show how to import and use model.
• Understand image captioning and inception-v3
• Run TensorFlow code for image captioning
• Implement Reservation.java
Working with TensorFlow on AWS Lambda
Serverless deployment provides different ways of deploying deep learning applications. This video shows the advantages and disadvantages of these methods.
Compare advantages and disadvantages of using model within Lambda package
Learn the advantages and disadvantages of using models from S3 bucket
There are a number of challenges with deploying big packages on AWS Lambdas. This video addresses them and shows hot to tackle them.
Explore limits of AWS Lambda in terms of packaging code and libraries
Understand how to optimize package so it works on AWS Lambda
Run code which packages TensorFlow for AWS Lambda
Once we have package we can now need to make sure it will work with our AWS Lambda service.
Create AWS Lambda which will work with TensorFlow package
Alternatively we can start deploying TensorFlow package using serverless framework. This is extremely convenient for production deployment.
Deploy AWS Lambda with TensorFlow package using serverless framework
Creating Deep Learning API
Rest API is one of the most important frameworks for connecting between frontend and backend, or within services in backend.
Understand Rest API and its role in the microservice world
Learn about AWS API gateway and how it works
API Gateway with AWS Lambda allows one of the easiest ways to create a REST API service. In this lesson we will show how to do so.
Create Lambda with API response using API gateway through AWS console
In production the best way to deploy API Gateway with AWS Lambda is serverless framework. In this lesson we will show how to do so.
Create Lambda with API response using API gateway through serverless framework
Deep learning API can be used in a number of applications and can be extremely convenient for small project. In this lesson we will show how to deploy Deep learning API.
Explore possible applications of deep learning API
Deploy deep learning API using serverless
Creating Deep Learning Pipeline
When we have a stream of events which we need to process, one of the best ways to do so is to organize queue which will allow us to handle the stream of events. AWS SQS allows to do exactly that and we will learn more on how it works.
Learn about the query services and how they are used in contemporary infrastructures
Explore existing services within AWS and learn why SQS is convenient job queue
Understand how AWS SQS works
SQS with AWS Lambda allows one of the easiest ways to create a processing pipeline. In this lesson we will show how to do so.
Create Lambda with SQS through AWS console
In production the best way to deploy SQS with AWS Lambda is serverless framework. In this lesson we will show how to do so.
Create Lambda with SQS through serverless framework
Deep learning pipeline can be used in a number of applications and can be extremely convenient for big infrastructures. In this lesson we will show how to deploy Deep learning pipeline.
Explore possible applications of deep learning pipeline
Deploy deep learning pipeline using serverless framework
Creating Deep Learning Workflow
One of the main problems with handling stream of events is to be able to handle errors and redirect traffic. AWS Step Functions allows to tackle these challenges. In this lesson we will learn how it works.
Understand the workflow services and how they are used in contemporary infrastructures
See how step functions revolutionized workflows and integration between serverless and cluster
Look at how AWS Step Functions work
AWS Step Functions with AWS Lambda allows one of the easiest ways to create a processing workflow. In this lesson we will show how to do so.
Create Lambda with Step Functions through AWS console
In production the best way to deploy AWS Step Functions with AWS Lambda is serverless framework. In this lesson we will show how to do so.
Create Lambda with Step Functions through serverless framework
Deep learning workflow can be used in a number of applications and can be extremely convenient for advanced infrastructures. In this lesson we will show how to deploy Deep learning workflow.
See possible applications of deep learning workflow
Deploy deep learning workflow using serverless