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

  Рет қаралды 32,222

Data Science Garage

Data Science Garage

Күн бұрын

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-...
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: • AWS IAM: Users, Groups...
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!

Пікірлер: 45
@reachDeepNeuron
@reachDeepNeuron 2 ай бұрын
that step by step , 3 step explanation was a real eye opener was able to understand the big picture
@zg7860
@zg7860 Жыл бұрын
this is a very high quality channel, thank you
@DataScienceGarage
@DataScienceGarage Жыл бұрын
Thank you for watching! You are welcome :)
@anasouassou6509
@anasouassou6509 3 ай бұрын
Thank you so much man, this is some top notch quality content !
@archael18
@archael18 4 ай бұрын
This was very helpful. Thank you!
@saisrujansai1144
@saisrujansai1144 Жыл бұрын
Short and clear video to understand easily. Thanks
@DataScienceGarage
@DataScienceGarage Жыл бұрын
Thanks for watching, appreciate! :)
@sushantgautam773
@sushantgautam773 Жыл бұрын
Useful one! Thanks for sharing!
@jawadasif8130
@jawadasif8130 Жыл бұрын
clearly explained for beginner. thank you
@DataScienceGarage
@DataScienceGarage Жыл бұрын
Thank you for watching! Appreciate your feedback! :)
@mohammedameen7409
@mohammedameen7409 10 ай бұрын
Beautiful 😍
@tony0731
@tony0731 Жыл бұрын
The video is awesome! It's very comprehensive and useful! I have a question about the API Gateway. If we want to access the model endpoint from other AWS services like EC2, do we still have to use lambda and API Gateway? It seems like combining lambda and API gateway is for the external user. Thanks a lot!
@pancho1366
@pancho1366 2 жыл бұрын
Super educational video, very clear to understand. Thx Amigo!! gl hf
@PMKB4
@PMKB4 Жыл бұрын
Superb explanation!
@DataScienceGarage
@DataScienceGarage Жыл бұрын
Thanks for such feedback! Appreciate! :)
@adhikarikalyan
@adhikarikalyan Жыл бұрын
Subscribed ! Thank you for the tutorial. It will be good if you can let us know how we can use AWS Model Registry adding to this architecture.
@DataScienceGarage
@DataScienceGarage 2 жыл бұрын
Thank you again for watching this tutorial, I really hope it was useful and worth your time. In addition to that, if your really like AWS for ML and DevOps, I created (and still creating) a special KZfaq channel for this, check it out here: kzfaq.info/sun/PLjJWtyuv5yrrMl5xVF5B_NrMcb7fjenDt The best place to learn Data Science with the best in the industry - Turing College. READ MORE HERE: turingcollege.org/DataScienceGarage - Suggest the topic for the next video! - Share you experience on this tutorial below! Appreciate it!
@nishantkumar-lw6ce
@nishantkumar-lw6ce 2 жыл бұрын
Amazing! I am still figuring out how to automate process of running my model to score every two weeks.
@DataScienceGarage
@DataScienceGarage 2 жыл бұрын
@@nishantkumar-lw6ce Thanks for feedback, appreciate!
@nishantkumar-lw6ce
@nishantkumar-lw6ce 2 жыл бұрын
@@DataScienceGarage Can you help share ideas on how I can setup an automated code run based on batch inference from trained model?
@islamicinterestofficial
@islamicinterestofficial 10 ай бұрын
What an amazing video. I can't say enough thanks
@DataScienceGarage
@DataScienceGarage 10 ай бұрын
Big pleasure to see such feedback, appreciate!
@mohamedabdo-xg6tw
@mohamedabdo-xg6tw 8 ай бұрын
the Best ML Sagemaker video. Thank you for sharing!
@DataScienceGarage
@DataScienceGarage 8 ай бұрын
Thanks for watching! That's inspiring to create more :)
@joseneto6558
@joseneto6558 2 жыл бұрын
Thanks a lot my bro! Do you know what's the average cost of mantaining this structure 24h/30 days per month inservice? Cause I have a simple logistic Regression model that i would like to serve to an external javascript front end
@saulitasmith7007
@saulitasmith7007 5 ай бұрын
labai gerai paaiskinta. Achiu
@DataScienceGarage
@DataScienceGarage 5 ай бұрын
Ačiū, kad žiūrite! :)
@ankitmishra5566
@ankitmishra5566 2 ай бұрын
This video needs more visibility !!
@DataScienceGarage
@DataScienceGarage 2 ай бұрын
Thanks! Share, like and subscribe! :))
@nishantkumar-lw6ce
@nishantkumar-lw6ce 2 жыл бұрын
Where can I get the notebook and code? So the process to generate predictions is to invoke an already created endpoint and then run predictions on top of it?
@sasikumartist
@sasikumartist 9 ай бұрын
Thank you for making this video. I am trying to follow along this video. Now the Jupyter notebook code of Breast cancer dataset is not available. Could you please advise where can we find the same code?
@user-el1fi4nv5h
@user-el1fi4nv5h Жыл бұрын
End to end explanation .Thanks for this video.
@DataScienceGarage
@DataScienceGarage Жыл бұрын
Thanks for watching! Appreciate your time!
@user-wj5et4ko1z
@user-wj5et4ko1z 2 ай бұрын
HI, thanks for your content!!!! I have one question. I have large NLP model and it requires GPU. If so does lambda use computing resources? or sagemaker?
@user-xe1sn6qc8c
@user-xe1sn6qc8c Жыл бұрын
Hello. The Sagemaker endpoint can take requests and scale up if needed. Why do we need another wrapper as lambda on it?
@IIGrudge
@IIGrudge 9 ай бұрын
You typically don't want to expose Sagemaker endpoint to the public. I'm guessing he's trying to mimic real world where you are integrating with an application. Using apigateway allows you to customize a different payload as well.
@AnkitGupta-rj4yy
@AnkitGupta-rj4yy Ай бұрын
good
@DataScienceGarage
@DataScienceGarage Ай бұрын
Thanks!
@dasadiyavishvdeepmanishbha2423
@dasadiyavishvdeepmanishbha2423 Жыл бұрын
Can we have notebook for demo practice from github or gitlabs
@adesojialu6208
@adesojialu6208 Жыл бұрын
so how do i connect a web app ui so that a client can visit a public ip address and make request from a public address from aws
@ransinghray3688
@ransinghray3688 Жыл бұрын
Hi can you show similar thing in R too, it would be very helpful
@DataScienceGarage
@DataScienceGarage Жыл бұрын
Sorry, I have almost zero experience in R...
@joseneto6558
@joseneto6558 2 жыл бұрын
Anyone knows how can I invoke predictions with JavaScript?
@Tim28259
@Tim28259 7 ай бұрын
how much does it cost to try it?
@JhinguBaba
@JhinguBaba Ай бұрын
...is he trying to fake indian accent? Honest q. great content.
Github Action to AWS ECR (Docker Image) | Full  Hands-on Tutorial
15:01
Data Science Garage
Рет қаралды 4,8 М.
AWS Sagemaker tutorial | Build and deploy a Machine Learning API with Python
53:32
Computer vision engineer
Рет қаралды 9 М.
Вечный ДВИГАТЕЛЬ!⚙️ #shorts
00:27
Гараж 54
Рет қаралды 12 МЛН
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 184 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 31 МЛН
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 17 МЛН
What is Amazon SageMaker?
14:26
mikegchambers
Рет қаралды 62 М.
AWS Summit ANZ 2022 - End-to-end MLOps for architects (ARCH3)
23:02
Create Your First AWS Lambda Function | AWS Tutorial for Beginners
12:44
Tiny Technical Tutorials
Рет қаралды 128 М.
AWS SageMaker | Hands-on Tutorial For Beginners | Thinknyx
11:08
Thinknyx Technologies
Рет қаралды 2,1 М.
Deliver high-performance ML models faster with MLOps tools
1:01:08
AWS Developers
Рет қаралды 9 М.
Deploy LLMs (Large Language Models) on AWS SageMaker using DLC
57:06
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 35 МЛН
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,4 МЛН
#miniphone
0:16
Miniphone
Рет қаралды 3,6 МЛН
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 28 МЛН