- Model Function

Deploying a predictive model function to Lambda.

In order to author a Lambda function that uses libraries outside the base Python distribution, you’ll need to set up a local environment that defines the function and includes all of the dependencies. Once your function is defined, you can upload the function by creating a zip file of the local environment, uploading the resulting file to S3, and configuring a Lambda function from the file uploaded to S3.

Getting started

The first step in this process is to create a directory with all of the dependencies installed locally.

While it’s possible to perform this process on a local machine, we will perform these tasks in our code widget below to provide a clean Python environment.

Creating the environment

The next step is to install the libraries needed for the function, which ...