Access Machine Learning Models Using SQL

How to access SageMaker models from Redshift

Lewis Gavin
3 min readApr 3, 2024
Photo by Markus Winkler on Unsplash

As a data engineer, you’ve done all the hard work of ingesting data from a variety of sources into your data warehouse and have cleaned and modelled it. Now, a team of data scientists is looking to use some of that data for training a model and running predictions against it.

How do we engineer a solution that is both practical and cost effective?

Well, in recent years, AWS have made it easier for data engineers and data scientists to build machine learning workflows by providing tools that simplify the process.

First, you need to automate or simplify data extraction for use in models. Second, make it easy to run batch inference against these models.

In this post, we’ll look at how you can train and predict against machine learning models in SageMaker using SageMakers batch inference and Redshift ML.

Creating Models in SageMaker

SageMaker is a platform for building and deploying machine learning models that can then be used by external services. Models can be created by writing Python code then deployed using helper functions provided by the SageMaker SDK.

--

--