How to build ML Architecture with AWS SageMaker + Lambda + API Gateway | HANDS-ON TUTORIAL @DataScienceGarage
How to build ML Architecture with AWS SageMaker + Lambda + API Gateway | HANDS-ON TUTORIAL  @DataScienceGarage
Uploaded May 2022 | Updated September 2026, 2 weeks ago
This tutorial shows how to set-up a Machine Learning Architecture in Amazon Web Services by using combination of Amazon SageMaker, AWS Lambda Function, and Amazon API Gateway.

The main idea is to build a workflow in cloud where a regular end user from public internet can make requests on pre-trained ML model and get a prediction (or AI-based insights) in a second back.

From technical perspective, the backed works in such way: the the end use input his/her data and send it to API Gateway which uses REST API. Once the API service receive this input data, it forward it to pre-defined AWS Lambda function. Here, AWS Lambda function triggers the ML model endpoint which was created after the model training was completed and it's artifact saved in S3 bucket.
Finally, the ML endpoint after received user input data, make a prediction using a pre-trained ML model and send back a predicted value in the same way through AWS Lambda to Amazon API Gateway.

So, this video provides one of many ways how to deploy a Machine Learning model on the cloud using AWS.

In this video, the usage of Amazon API Gateway is demonstrated either by using AWS Console and a custom Python script (where you can flexible leverage the API functionality).

For demonstration purposes, in this video as an example I use breast cancer diagnosis prediction Machine Learning problem. The ML model endpoint was created specifically on this use case. You can find this notebook directly from AWS SageMaker Notebook templates.

Documentation used in this tutorial, where you can find snippets for IAM role and AWS Lambda code in Python programming language used in this video:
aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint-using-amazon-api-gateway-and-aws-lambda

Read more related to this use case:
- Amazon IAM: aws.amazon.com/iam
- Amazon SageMaker: aws.amazon.com/pm/sagemaker
- AWS Lambda Function: aws.amazon.com/lambda
- Amazon API Gateway: aws.amazon.com/api-gateway

- Also, I highly recommend to refresh you knowledge on IAM (Identity & Access Management), AWS Roles, Policies and Groups with this video: youtu.be/Ey9waqflzI4

The content of the tutorial:
0:00 - Explanation of ML architecture on AWS
2:15 - AWS Hand-on! Create AWS SageMaker Notebook Instance
4:49 - Explanation of Jupyter Notebook and train the ML model
8:17 - Build the SageMaker Endpoint for ML model
11:11 - Set-up AWS Lambda function
16:32 - Set-up Amazon API Gateway
19:05 - Test the ML architecture on AWS

I hope this tutorial was useful for you. If need any help, or wanna to share your experience or suggest a topic for the next video, please drop a comment below! - Thank you!

#sagemaker #lambdafunction #apigateway

Slava Ukraina!
How to build ML Architecture with AWS SageMaker + Lambda + API Gateway | HANDS-ON TUTORIALPhotoshop - could not complete your request because the scratch disks are fullAWS CodeCommit tutorial: your first Repo, Commit and PushPolars vs Pandas | detailed test with explained resultsBokeh Charts interface in Python for plotting and data visualizationHow SHAP value is calculated? It is not hard! (simple example)Perkūnkiemis - vakarinis aplinkelis 2016 (Žiema, gruodis) [TIMELAPSE]AWS Step Functions to orchestrate Lambda functions - Step by Step ExampleBaggage reclaim in Lithuania. Kaunas international airport. Arrival.Read and Visualize Audio Files in Python (librosa module)Get Geographical Coordinates from Google Maps API for any Address. Real Python example.Calculate TF-IDF in NLP (Simple Example)
Data Science Garage |

How to build ML Architecture with AWS SageMaker + Lambda + API Gateway | HANDS-ON TUTORIAL

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER