SageMaker Tutorial 4 | Serverless ML Inference API with AWS Lambda & API Gateway 🚀
Hello, Guys, I am Spidy. I am back with another video. This tutorial guides you through the process of building a serverless inference for SKLearn ML model using API Gateway and AWS Lambda function using AWS SAM. Chapters: 00:00 - Video Introduction 00:12 - Introduction to the Video Topic 01:25 - Train ML model 02:45 - Serialise the model (Pickle / Joblib) 02:54 - Record Python version 04:07 - SAM Structure explanation 04:32 - Adding Requirements.txt for Lambda 05:15 - Lambda Handler for SKlearn Inference 07:45 - Terminal commands for deployment 08:51 - AWS SAM Template explanation 12:08 - SAM Build & Deploy Stack 15:40 - Validating SAM CloudFormation 16:24 - Lambda and API Gateway setup review 17:06 - Testing Lambda API Gateway Inference in postman 17:38 - Latency of Lambda ML Inference API 19:45 - Quick Recap Steps that we followed: Step-1: Train the model (Local / SageMaker / On-Premises) Step-2: Serialise the model (Pickle / Joblib) Step-3: Record runtime versions. Note the exact Python and scikit-learn versions Step-4: Implement the Lambda inference handler Step-5: Prepare dependencies & SAM layout Step-6: Define infrastructure in SAM. Describe the Lambda Step-7: Build and deploy the stack. Perform Step-8: Validate, monitor, and Test call to the /inference endpoint Utilised AWS services: - AWS Lambda : Python 3.11 serverless runtime - Amazon API Gateway (REST) : /inference endpoint, CORS enabled - AWS SAM : Build + deploy (with Docker for reproducible builds) - Amazon CloudWatch Logs : Function logs and troubleshooting - Cloudformation : Manage SAM stack Code ► https://github.com/Spidy20/Sagemaker-Tutorials AWS Tutorials ► https://youtube.com/playlist?list=PLsT53VV2LIIGnKRdYHMo-KO9uQcIhbFPs Donate ► machinelearninghubai@okhdfcbank Note: If you want me to solve your errors and make the project run into the system, I will do it using a remote desktop, and it will be paid. You can reach me at [email protected] for your queries. 🔥 Don't forget to Subscribe My GitHub for free projects► https://github.com/Spidy20 My store for buying paid projects► https://bit.ly/3hXSZxQ Facebook► https://www.facebook.com/machinelearninghubai/ Instagram► https://www.instagram.com/machine_learning_hub.ai Paypal► https://www.paypal.com/paypalme/spidy1820 Buy Coffee for me► https://www.buymeacoffee.com/spidy20 Playlist that you should check👇 Machine Learning College Projects► https://www.shorturl.at/mpIJY Python College Projects► https://www.shorturl.at/nDR25 Android App using Python► https://www.shorturl.at/pzCMQ "The video thumbnails were created using publicly available images from Google images and are used solely for thumbnail purposes. I do not claim ownership of these images. If you are the owner of any copyrighted content used in these thumbnails and want them removed or changed, please contact me, and I will comply promptly. Thank you." #aws #docker #lambda #serverless #inference #ml #sagemaker
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.