In the previous chapter, we trained a deep learning model for categorizing images of clothing. Now we need to deploy it, making the model available for other services.
We have many possible ways of doing this. We have already covered the basics of model deployment in chapter 5, where we talked about using Flask, Docker, and AWS Elastic Beanstalk for deploying a logistic regression model.
In this chapter, we’ll talk about the serverless approach for deploying models—we’ll use AWS Lambda.
AWS Lambda is a service from Amazon. Its main promise is that you can “run code without thinking about servers.”
It lives up to the promise: in AWS Lambda, we just need to upload some code. The service takes care of running it and scales it up and down according to the load.
Additionally, you only need to pay for the time when the function is actually used. When nobody uses the model and invokes our service, you don’t pay for anything.