Site icon Machine Learning Projects

How to build, test, and deploy your first Lambda on AWS – 2023

Machine Learning Projects

Hey guys, in today’s blog we will see how to deploy your first Lambda on AWS. In the last blog, we saw a detailed step-by-step guide on How to create an API in AWS API Gateway using AWS Lambda. So without any further due, let’s do it.

You can create Lambda in 3 different ways:

First way

NOTE – The headers that I have added are used when we need to create an API from this Lambda. You can remove them according to your need.

NOTE – Use this method only when you are doing some minor tasks and you don’t have any requirements for extra packages/libraries. If you are having some heavy requirements like Tensorflow, go with the ECR method.

Second way

 conda create -n testlambda python=3.9
conda activate testlambda
pip install numpy
pip freeze > requirements.txt
pip install -r requirements.txt -t .

NOTE – For files larger than 10 MB, consider uploading your zip to Amazon S3 and selecting the Amazon S3 location in Upload from dropdown.

Third Way

Check out this blog on how to deploy Lambda using ECR Docker ImageHow to create an AWS Lambda using AWS ECR Docker container Image in Python

So this is how you will deploy your first Lambda on AWS, thanks for reading it and I hope you are taking something with you after reading this and till the next time ?…

Check out my other machine learning projectsdeep learning projectscomputer vision projectsNLP projectsFlask projects at machinelearningprojects.net

Exit mobile version