SlideShare a Scribd company logo
Production ML Models
MJ Berends
Staff Engineer @
ActiveCampaign
Data and analytics architect
with a love for building
large-scale systems that distill
the essence from highly
complex and idiosyncratic data.
ActiveCampaign helps growing
businesses meaningfully connect
and engage with their customers.
We go beyond marketing automation to
enable businesses to optimize their
customers’ experiences.
71,000+
Customers
400+
Employees
150+
Countries
Roadmap 1. What even is Machine Learning?
2. A view of the ML process
3. A quick tour of SageMaker
4. A simple model with SageMaker
5. The production ecosystem
What is SageMaker?
SageMaker helps data scientists and
developers to build, train, and deploy machine
learning models into a production-ready
hosted environment.
What even is machine learning?
A machine learns a task by reducing
its performance error
What even is machine learning?
Define a task
1
Define Performance
Error
2
Define Starting Place,
Incremental Improvement,
Stopping Place
3
TASK REWARD PATH
Evolution of learning
StatisticsRules
Find a Peanut Butter Sandwich
1. Think of a canonical example
2. Enumerate rules that describe that
example
a. Has bread
b. Has peanut butter
c. Is edible
3. Use those features to make guesses
4. Update your rules as you find
counter-examples
Rules
Find a Peanut Butter Sandwich
Statistics
1. Find sandwich examples and label them
as “good” or “bad”
2. Identify features that make it likely that
something is a sandwich
3. Use an algorithm to make guesses
4. Gradually change the features until your
guesses improve
The Machine Learning Process
Query the data
warehouse to uncover
preliminary patterns
Data Sleuthing
Select a few promising
approaches to modeling
Model Brainstorming
Train the model
candidates and inspect
the performance metrics
Model evaluation
Clean and transform the data
for model training
Training Data Creation
Pick the best-performing
model
Model Selection
Onward to production!
App Data
Warehouse
Experiment
management app
The Implementation at 20,000 Feet
Model ServingData Ingestion
Application
Data
Warehouse Training Data
Model training
MySQL Snowflake S3 SageMaker
Python
MLFlow
C +
Model Artifacts
Webserver
C +
Training Instances
Serving Instances
SageMaker
Python
API Gateway
S3
Model Exploration and Training
Data Scientist
Exploration
Jupyter
Notebook
Jupyter
Notebook
SageMaker
Data Lake
Table
1
Table
2
MLFLow
Artifact Store
File
Product DBs
API
SQL Query
Airflow
Sagemaker
Training Env
Task
S3 Container
Model Exploration and Training
Data Scientist
Exploration
Jupyter
Notebook
Jupyter
Notebook
SageMaker
Data Lake
Table
1
Table
2
MLFLow
Artifact Store
File
Product DBs
All data used in
exploration comes
from Data Lake
The product data is
exported to
Warehouse
periodically.
API
SQL Query
Airflow
Sagemaker
Sagemaker
manages
container
tasks
Training Env
Task
S3 Container
Model Exploration and Training
Data Scientist
Exploration
Jupyter
Notebook
Jupyter
Notebook
SageMaker
Data Lake
Table
1
Table
2
Training Env
TaskMLFLow
Artifact Store
S3
File
Product DBs
Models are built in
Jupyter notebooks.
MLFlow manages
deployment and
storage
API
SQL Query
Airflow
Sagemaker
Model Exploration and Training
Data Scientist
Exploration
Jupyter
Notebook
Jupyter
Notebook
SageMaker
Data Lake
Table
1
Table
2
MLFLow
Artifact Store
File
Product DBs
MLFlow manages
deployment and
storage
API
SQL Query
Airflow
Sagemaker
Training Env
Task
S3 Container
Model Exploration and Training
Data Scientist
Exploration
Jupyter
Notebook
Jupyter
Notebook
SageMaker
Data Lake
Table
1
Table
2
MLFLow
Artifact Store
File
Product DBs
API
SQL Query
Airflow
Sagemaker
Training Env
Task
S3 Container
Sagemaker
manages
container
tasks
App 1
App 2
App 3
Endpoint Model
Client Applications Model Serving
Users
Production Account
ECR S3
Sage-
maker
Data Science
Account
Endpoint Model
Endpoint Model
Model Serving
So, how do you use SageMaker?
Publishing a new model to Sagemaker is a three-step process, consisting
of:
1. Creating a Model
2. Creating an Endpoint Configuration
3. Creating an Endpoint
What’s in a Model?
Network
VPC
Access Controls
Execution
Role
Container
Image
S3
ECR
VPC
EndpointSecurity
Groups
Subnets
Model Data
URL
What’s in an Endpoint Config?
Instance
Count
Instance
Type
Model Variant
Weight
How many instances should but spun up at the start?
How big should the instances be?
How should traffic be routed among models?
What’s in an Endpoint?
Endpoint
Config
Instances
All the details for spinning up a fleet of model versions
One or more instances that run model containers
Autoscaling via Application
Autoscaling
Also... Monitoring via CloudWatch
Lessons
Build relationships across teams
Integrate with the product early
Focus on the modeling ecosystem
Expect requirements to change
Iterate Always
THANK YOU!
Q&A
"using sagemaker to build and deploy ml models in production" - MJ Berends AWS Chicago user group June 6 2019
"using sagemaker to build and deploy ml models in production" - MJ Berends AWS Chicago user group June 6 2019
Model Exploration
Data Scientist
Exploration
Jupyter
Notebook
Jupyter
Notebook
SageMaker
Data Lake
Table
1
Table
2
MLFLow
Artifact Store
File
Product DBs
Models are built in
Jupyter notebooks.
MLFlow manages
deployment and
storage
All data used in
exploration comes
from Data Lake
The product data is
exported to
Warehouse
periodically.
API
SQL Query
Airflow
Sagemaker
Sagemaker
manages
container
tasks
Training Env
Task
S3 Container

More Related Content

PPTX
Azure machine learning ile tahminleme modelleri
PDF
Amazon SageMaker workshop
PPT
Strata CA 2019: From Jupyter to Production Manu Mukerji
PPTX
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
PPTX
Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...
PPTX
AI Stack on AWS: Amazon SageMaker and Beyond
PPTX
Where ml ai_heavy
PPTX
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Azure machine learning ile tahminleme modelleri
Amazon SageMaker workshop
Strata CA 2019: From Jupyter to Production Manu Mukerji
Machine Learning: From Notebook to Production with Amazon Sagemaker (April 2018)
Machine Learning: From Notebook to Production with Amazon Sagemaker (January ...
AI Stack on AWS: Amazon SageMaker and Beyond
Where ml ai_heavy
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...

Similar to "using sagemaker to build and deploy ml models in production" - MJ Berends AWS Chicago user group June 6 2019 (20)

PDF
AWS ML Model Deployment
PDF
Machine Learning with Amazon SageMaker
PPTX
Amazon sage maker infinitely scalable machine learning algorithms
PDF
Sagemaker Brownbag
PPTX
Practical data science
PDF
Data Summer Conf 2018, “Build, train, and deploy machine learning models at s...
PPTX
ML_Development_with_Sagemaker.pptx
PPTX
Demystifying Amazon Sagemaker (ACD Kochi)
PDF
AWS reinvent 2019 recap - Riyadh - AI And ML - Ahmed Raafat
PPTX
Demystifying Machine Learning with AWS (ACD Mumbai)
PPTX
WhereML a Serverless ML Powered Location Guessing Twitter Bot
PPTX
ACDKOCHI19 - Demystifying amazon sagemaker
PDF
End-to-End Machine Learning with Amazon SageMaker
PPTX
Advanced Machine Learning with Amazon SageMaker
PPTX
Deep Dive Amazon SageMaker
PPTX
Intro to SageMaker
PDF
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
PPTX
Aws autopilot
PPTX
Amazon SageMaker for MLOps Presentation.
PDF
Amazon SageMaker
AWS ML Model Deployment
Machine Learning with Amazon SageMaker
Amazon sage maker infinitely scalable machine learning algorithms
Sagemaker Brownbag
Practical data science
Data Summer Conf 2018, “Build, train, and deploy machine learning models at s...
ML_Development_with_Sagemaker.pptx
Demystifying Amazon Sagemaker (ACD Kochi)
AWS reinvent 2019 recap - Riyadh - AI And ML - Ahmed Raafat
Demystifying Machine Learning with AWS (ACD Mumbai)
WhereML a Serverless ML Powered Location Guessing Twitter Bot
ACDKOCHI19 - Demystifying amazon sagemaker
End-to-End Machine Learning with Amazon SageMaker
Advanced Machine Learning with Amazon SageMaker
Deep Dive Amazon SageMaker
Intro to SageMaker
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
Aws autopilot
Amazon SageMaker for MLOps Presentation.
Amazon SageMaker
Ad

More from AWS Chicago (20)

PPTX
Kathie Kinde Clark - Elevate Your Professional Footprint: LinkedIn Masterclass
PDF
Jason Anderson From Dirt Roads to Highways: Simplifying DevOps and Cloud Inf...
PDF
Aman Sardana and Vijay Kumar Soni - Navigating Hybrid Cloud Challenges for ...
PDF
Ben Blair Operating Safely in a Vibe Coding World
PPTX
Joseph Morotti Enhancing customer experience through Amazon Connect and Gene...
PPTX
Craig Johnson When VPCs Attack: Real-Life Cloud Networking Fails (and Fixes)
PDF
Peter Sankauskas Access Denied: Understanding & Debugging AWS IAM
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
PDF
Bob Fornal The Impact of Testing on a DevOps Pipeline
PDF
Jason Butz Chaos Engineering with FIS and Lambda Functions
PPTX
Automated VPC migration into centralized inspection architecture with AWS Gat...
PDF
Julia Furst Morgado The Lazy Guide to Kubernetes with EKS Auto Mode + Karpenter
PDF
Bob Fornal - Active Career Management AWS Community Day Midwest 2025
PDF
Edwin Moedano Monitoring and Observability of Lambdas with Cloudwatch and Po...
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
PPTX
Nathan Hiscock Architecting secure, scalable, cost-efficient computer vision...
PDF
AWS Community Day Midwest 2025 Julia Furst Morgado The Lazy Guide to Kuberne...
PDF
Steven Seaney - Simplifying and Streamlining AWS Control Tower Deployments
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
PPTX
Paul Chin Jr. Data Gone in 60 Seconds: A Serverless ETL Heist
Kathie Kinde Clark - Elevate Your Professional Footprint: LinkedIn Masterclass
Jason Anderson From Dirt Roads to Highways: Simplifying DevOps and Cloud Inf...
Aman Sardana and Vijay Kumar Soni - Navigating Hybrid Cloud Challenges for ...
Ben Blair Operating Safely in a Vibe Coding World
Joseph Morotti Enhancing customer experience through Amazon Connect and Gene...
Craig Johnson When VPCs Attack: Real-Life Cloud Networking Fails (and Fixes)
Peter Sankauskas Access Denied: Understanding & Debugging AWS IAM
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
Bob Fornal The Impact of Testing on a DevOps Pipeline
Jason Butz Chaos Engineering with FIS and Lambda Functions
Automated VPC migration into centralized inspection architecture with AWS Gat...
Julia Furst Morgado The Lazy Guide to Kubernetes with EKS Auto Mode + Karpenter
Bob Fornal - Active Career Management AWS Community Day Midwest 2025
Edwin Moedano Monitoring and Observability of Lambdas with Cloudwatch and Po...
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
Nathan Hiscock Architecting secure, scalable, cost-efficient computer vision...
AWS Community Day Midwest 2025 Julia Furst Morgado The Lazy Guide to Kuberne...
Steven Seaney - Simplifying and Streamlining AWS Control Tower Deployments
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
Paul Chin Jr. Data Gone in 60 Seconds: A Serverless ETL Heist
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
A Presentation on Artificial Intelligence
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Spectroscopy.pptx food analysis technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
A Presentation on Artificial Intelligence
MIND Revenue Release Quarter 2 2025 Press Release
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
NewMind AI Weekly Chronicles - August'25-Week II
20250228 LYD VKU AI Blended-Learning.pptx
Review of recent advances in non-invasive hemoglobin estimation
Spectroscopy.pptx food analysis technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Reach Out and Touch Someone: Haptics and Empathic Computing
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Encapsulation_ Review paper, used for researhc scholars
A comparative analysis of optical character recognition models for extracting...
Per capita expenditure prediction using model stacking based on satellite ima...
Programs and apps: productivity, graphics, security and other tools
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...

"using sagemaker to build and deploy ml models in production" - MJ Berends AWS Chicago user group June 6 2019

  • 2. MJ Berends Staff Engineer @ ActiveCampaign Data and analytics architect with a love for building large-scale systems that distill the essence from highly complex and idiosyncratic data.
  • 3. ActiveCampaign helps growing businesses meaningfully connect and engage with their customers. We go beyond marketing automation to enable businesses to optimize their customers’ experiences. 71,000+ Customers 400+ Employees 150+ Countries
  • 4. Roadmap 1. What even is Machine Learning? 2. A view of the ML process 3. A quick tour of SageMaker 4. A simple model with SageMaker 5. The production ecosystem
  • 5. What is SageMaker? SageMaker helps data scientists and developers to build, train, and deploy machine learning models into a production-ready hosted environment.
  • 6. What even is machine learning? A machine learns a task by reducing its performance error
  • 7. What even is machine learning? Define a task 1 Define Performance Error 2 Define Starting Place, Incremental Improvement, Stopping Place 3 TASK REWARD PATH
  • 9. Find a Peanut Butter Sandwich 1. Think of a canonical example 2. Enumerate rules that describe that example a. Has bread b. Has peanut butter c. Is edible 3. Use those features to make guesses 4. Update your rules as you find counter-examples Rules
  • 10. Find a Peanut Butter Sandwich Statistics 1. Find sandwich examples and label them as “good” or “bad” 2. Identify features that make it likely that something is a sandwich 3. Use an algorithm to make guesses 4. Gradually change the features until your guesses improve
  • 11. The Machine Learning Process Query the data warehouse to uncover preliminary patterns Data Sleuthing Select a few promising approaches to modeling Model Brainstorming Train the model candidates and inspect the performance metrics Model evaluation Clean and transform the data for model training Training Data Creation Pick the best-performing model Model Selection Onward to production! App Data Warehouse Experiment management app
  • 12. The Implementation at 20,000 Feet Model ServingData Ingestion Application Data Warehouse Training Data Model training MySQL Snowflake S3 SageMaker Python MLFlow C + Model Artifacts Webserver C + Training Instances Serving Instances SageMaker Python API Gateway S3
  • 13. Model Exploration and Training Data Scientist Exploration Jupyter Notebook Jupyter Notebook SageMaker Data Lake Table 1 Table 2 MLFLow Artifact Store File Product DBs API SQL Query Airflow Sagemaker Training Env Task S3 Container
  • 14. Model Exploration and Training Data Scientist Exploration Jupyter Notebook Jupyter Notebook SageMaker Data Lake Table 1 Table 2 MLFLow Artifact Store File Product DBs All data used in exploration comes from Data Lake The product data is exported to Warehouse periodically. API SQL Query Airflow Sagemaker Sagemaker manages container tasks Training Env Task S3 Container
  • 15. Model Exploration and Training Data Scientist Exploration Jupyter Notebook Jupyter Notebook SageMaker Data Lake Table 1 Table 2 Training Env TaskMLFLow Artifact Store S3 File Product DBs Models are built in Jupyter notebooks. MLFlow manages deployment and storage API SQL Query Airflow Sagemaker
  • 16. Model Exploration and Training Data Scientist Exploration Jupyter Notebook Jupyter Notebook SageMaker Data Lake Table 1 Table 2 MLFLow Artifact Store File Product DBs MLFlow manages deployment and storage API SQL Query Airflow Sagemaker Training Env Task S3 Container
  • 17. Model Exploration and Training Data Scientist Exploration Jupyter Notebook Jupyter Notebook SageMaker Data Lake Table 1 Table 2 MLFLow Artifact Store File Product DBs API SQL Query Airflow Sagemaker Training Env Task S3 Container Sagemaker manages container tasks
  • 18. App 1 App 2 App 3 Endpoint Model Client Applications Model Serving Users Production Account ECR S3 Sage- maker Data Science Account Endpoint Model Endpoint Model Model Serving
  • 19. So, how do you use SageMaker? Publishing a new model to Sagemaker is a three-step process, consisting of: 1. Creating a Model 2. Creating an Endpoint Configuration 3. Creating an Endpoint
  • 20. What’s in a Model? Network VPC Access Controls Execution Role Container Image S3 ECR VPC EndpointSecurity Groups Subnets Model Data URL
  • 21. What’s in an Endpoint Config? Instance Count Instance Type Model Variant Weight How many instances should but spun up at the start? How big should the instances be? How should traffic be routed among models?
  • 22. What’s in an Endpoint? Endpoint Config Instances All the details for spinning up a fleet of model versions One or more instances that run model containers Autoscaling via Application Autoscaling Also... Monitoring via CloudWatch
  • 23. Lessons Build relationships across teams Integrate with the product early Focus on the modeling ecosystem Expect requirements to change Iterate Always
  • 27. Model Exploration Data Scientist Exploration Jupyter Notebook Jupyter Notebook SageMaker Data Lake Table 1 Table 2 MLFLow Artifact Store File Product DBs Models are built in Jupyter notebooks. MLFlow manages deployment and storage All data used in exploration comes from Data Lake The product data is exported to Warehouse periodically. API SQL Query Airflow Sagemaker Sagemaker manages container tasks Training Env Task S3 Container