Practical Deep Learning using AWS SageMaker, Lambda, and API Gateway

4 min readJul 5, 2021

Practical deep learning using AWS SageMaker, AWS Lambda, and API Gateway.

Photo by Alex Knight on Unsplash


In the previous article, we go through the basics of SageMaker on training, testing, and deployment of a machine learning model. We are particularly using the XgBoost sample notebook to predict potential customers that are most likely to convert based on customer and aggregate level metrics.

In this article, let’s use a deep learning model provided by AWS SageMaker, and expose the endpoint leveraging Lamba and API Gateway.

Deploy a Deep Learning Model

I am going to deploy YOLOv3 Object Detector from the AWS Marketplace

This model can detect multiple objects on the input image. The results include category names, confidence scores, and absolute locations on the input image.

YOLOv3 Predictions

Once deployed, you should be able to see the model endpoint.

YOLOv3 SageMaker Endpoint

Inference using Boto3

Using the below code snippet, I can invoke the endpoint to make inferences.


Software engineer, Data Science and ML practitioner.

Recommended from Medium


See more recommendations