SlideShare ist ein Scribd-Unternehmen logo
1 von 14
1 | 5 0
Deploying Computer
Vision Model as an API
using
AWS Lambda & API
Gateway
2 | 5 0
Topic
Deploying Computer Vision Model as an
API using AWS Lambda & API Gateway
2 | 5 0
Speaker
SHIRISH GUPTA
HEAD – DATA SCIENCE & PARTNERSHIPS AT
LOAN2GROW
3 | 5 0
“Awesome. You have created a great machine learning algorithm. Am impressed by the
accuracy and love the technique. How can we implement it in our system?” Is this
something you have heard multiple times during a client or business meeting but never been able to
truthfully answer it? Worry not, this is probably faced by 90% (to be conservative) of fellow data
scientists. And AWS has many solutions for it. One of them being —
“AWS lambda function integrated with Amazon API gateway”
4 | 5 04 | 5 0
• What are AWS Lambda & Amazon API ?
• Overview of our approach
• Hands-On Training
• Login to AWS Lambda
• Understand & create a lambda_function
• Download & define layers(aka dependencies)
• Configure Amazon API gateway
• Deploy the API and test it using Postman or
Curl
Agenda for Today
5 | 5 0
AWS Lambda
AWS Lambda is an event-driven, serverless computing
platform provided by Amazon as a part of Amazon Web
Services. It is a computing service that runs code in response
to events and automatically manages the computing
resources required by that code. The concept
of serverless computing refers to the idea that you don’t
need to maintain your own servers to run these functions.
Which means you can just upload your codes (Python,
Node.js, Go, .NET, Java, Ruby) and Lambda will manage other
things like runtime, scaling, load balancing, etc.
Amazon API
Amazon API Gateway is a fully managed service that makes it
easy for developers to create, publish, maintain, monitor, and
secure APIs at any scale. APIs act as the front door for
applications to access data, business logic, or functionality
from your backend services. Using API Gateway, we can
create RESTful APIs and WebSocket APIs that enable real-
time two-way communication applications. API Gateway
supports containerized and serverless workloads, as well as
web applications.
6 | 5 0
Overview of our approa
• Write a simple OCR code using OpenCV +
Tesseract algorithm in Python language
• Configure the algorithm in AWS Lambda
• Deploy it as an API on Amazon API gateway
6 | 5 0
OCR or Optical character recognition or optical character reader is the electronic
or mechanical conversion of images of typed, handwritten or printed text into
machine-encoded text, whether from a scanned document, a photo of a
document, a scene-photo or from subtitle text superimposed on an image.
7 | 5 0
OCR or Optical
Character
RecognitionThe electronic or mechanical conversion of images of typed, handwritten
or printed text into machine-encoded text, whether from a scanned
document, a photo of a document, a scene-photo or from subtitle text
superimposed on an image.
8 | 5 0
Important Notes
• The workshop will require you to upload few python
libraries as zip files. You can download them from the
following link
• https://implayers.s3.amazonaws.com/Pillow.zip
• https://implayers.s3.amazonaws.com/tesseract-
layer.zip
• https://implayers.s3.amazonaws.com/pytesseract%3D
%3D0.3.3.zip
• Python codes & sample photos to test
https://drive.google.com/drive/folders/1jVXiI1QzOwaqW
ggY-kDGE4WTtsd2mbX5?usp=sharing
• Please refer to the following blog for other queries
https://towardsdatascience.com/aws-lambda-amazon-
api-gateway-not-as-daunting-as-they-sound-part-1-
d77b92f53626
Pre-requisites
• Python development experience
• Basics on Computer Vision and OCR
• Activated AWS account (You might need to enter your
credit card details to activate the account. Don’t worry
you won’t be charged for the same)
9 | 5 0
Let’s jump into the
workshop
1 0 | 5 0
Lambda_Function
The code (here: python) that runs on AWS Lambda is uploaded
as a Lambda function
• Event represents the event or trigger that caused the
invocation of the lambda. It’s like the input to the function.
eg: Lambda function can be triggered by an upload to S3 or
by passing some input/data via API Gateway.
• Context Provides information about the invocation,
and execution environment of your lambda. Can be used to
check the memory allocation or to retrieve the number of
milliseconds left before the execution times out. It’s like
extra or meta info provided by AWS to understand
function’s runtime.
Layers
• Although we have created the lambda function, it won’t execute
or run right away. The reason is that we haven’t downloaded or
installed the necessary libraries(dependencies) required for the
code to run.
• Like in a normal environment, we need to pip or conda install the
libraries, we will need to do the same thing for AWS lambda. We
do that by adding layers to our AWS lambda
• A ZIP archive that contains libraries, a custom runtime, or other
dependencies. With layers, you can use libraries in your function
without needing to include them in your deployment package
1 1 | 5 0
Curl Command
curl -X POST --data-binary @bookpage.jpg https://kglyy5173l.execute-api.us-east-
1.amazonaws.com/Testing
1 2 | 5 0
shirish201@gmail.com https://www.facebook.com/shirish
.gupta.180/
https://www.linkedin.com/in/shirish
-gupta-ba003742/
1 3 | 5 0
Thank you
1 4 | 5 0
Questions

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to AWS Amplify and the Amplify CLI Toolchain
Introduction to AWS Amplify and the Amplify CLI ToolchainIntroduction to AWS Amplify and the Amplify CLI Toolchain
Introduction to AWS Amplify and the Amplify CLI ToolchainAWS Germany
 
How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018Amazon Web Services
 
基于Aws的dev ops实践指南 王毅
基于Aws的dev ops实践指南 王毅基于Aws的dev ops实践指南 王毅
基于Aws的dev ops实践指南 王毅Mason Mei
 
aws lambda & api gateway
aws lambda & api gatewayaws lambda & api gateway
aws lambda & api gatewayfumihiko hata
 
Building APIs with Amazon API Gateway
Building APIs with Amazon API GatewayBuilding APIs with Amazon API Gateway
Building APIs with Amazon API GatewayAmazon Web Services
 
Getting started with AWS amplify
Getting started with AWS amplifyGetting started with AWS amplify
Getting started with AWS amplifyMarc Schröter
 
The Hitchhiker’s Guide to Hybrid Connectivity
The Hitchhiker’s Guide to Hybrid ConnectivityThe Hitchhiker’s Guide to Hybrid Connectivity
The Hitchhiker’s Guide to Hybrid ConnectivityBizTalk360
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
ActiveCampaign API Developer Talks - Motivating Sales with Code
ActiveCampaign API Developer Talks - Motivating Sales with CodeActiveCampaign API Developer Talks - Motivating Sales with Code
ActiveCampaign API Developer Talks - Motivating Sales with CodeJordan Skole
 
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure FunctionsChris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure FunctionsServerlessConf
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda FundamentalsPiyush Agrawal
 
What Is Serverless Computing
What Is Serverless ComputingWhat Is Serverless Computing
What Is Serverless ComputingCapital Numbers
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingAmazon Web Services
 
Serverless — it all started in Vegas
Serverless — it all started in VegasServerless — it all started in Vegas
Serverless — it all started in VegasMartin Buberl
 
Serverless Workflows on AWS - A Journey from SWF to Step Functions
Serverless Workflows on AWS - A Journey from SWF to Step FunctionsServerless Workflows on AWS - A Journey from SWF to Step Functions
Serverless Workflows on AWS - A Journey from SWF to Step FunctionsForrest Brazeal
 
Getting Started with Amazon EventBridge
Getting Started with Amazon EventBridgeGetting Started with Amazon EventBridge
Getting Started with Amazon EventBridgeSrushith Repakula
 
Raleigh DevDay 2017: Building CICD pipelines for serverless applications
Raleigh DevDay 2017: Building CICD pipelines for serverless applicationsRaleigh DevDay 2017: Building CICD pipelines for serverless applications
Raleigh DevDay 2017: Building CICD pipelines for serverless applicationsAmazon Web Services
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API GatewayMark Bate
 

Was ist angesagt? (20)

Introduction to AWS Amplify and the Amplify CLI Toolchain
Introduction to AWS Amplify and the Amplify CLI ToolchainIntroduction to AWS Amplify and the Amplify CLI Toolchain
Introduction to AWS Amplify and the Amplify CLI Toolchain
 
How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018
 
基于Aws的dev ops实践指南 王毅
基于Aws的dev ops实践指南 王毅基于Aws的dev ops实践指南 王毅
基于Aws的dev ops实践指南 王毅
 
aws lambda & api gateway
aws lambda & api gatewayaws lambda & api gateway
aws lambda & api gateway
 
API Gateway with legend lambada
API Gateway with legend lambadaAPI Gateway with legend lambada
API Gateway with legend lambada
 
Building APIs with Amazon API Gateway
Building APIs with Amazon API GatewayBuilding APIs with Amazon API Gateway
Building APIs with Amazon API Gateway
 
Getting started with AWS amplify
Getting started with AWS amplifyGetting started with AWS amplify
Getting started with AWS amplify
 
The Hitchhiker’s Guide to Hybrid Connectivity
The Hitchhiker’s Guide to Hybrid ConnectivityThe Hitchhiker’s Guide to Hybrid Connectivity
The Hitchhiker’s Guide to Hybrid Connectivity
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
ActiveCampaign API Developer Talks - Motivating Sales with Code
ActiveCampaign API Developer Talks - Motivating Sales with CodeActiveCampaign API Developer Talks - Motivating Sales with Code
ActiveCampaign API Developer Talks - Motivating Sales with Code
 
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure FunctionsChris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda Fundamentals
 
What Is Serverless Computing
What Is Serverless ComputingWhat Is Serverless Computing
What Is Serverless Computing
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 
Serverless — it all started in Vegas
Serverless — it all started in VegasServerless — it all started in Vegas
Serverless — it all started in Vegas
 
Serverless Workflows on AWS - A Journey from SWF to Step Functions
Serverless Workflows on AWS - A Journey from SWF to Step FunctionsServerless Workflows on AWS - A Journey from SWF to Step Functions
Serverless Workflows on AWS - A Journey from SWF to Step Functions
 
Getting Started with Amazon EventBridge
Getting Started with Amazon EventBridgeGetting Started with Amazon EventBridge
Getting Started with Amazon EventBridge
 
Raleigh DevDay 2017: Building CICD pipelines for serverless applications
Raleigh DevDay 2017: Building CICD pipelines for serverless applicationsRaleigh DevDay 2017: Building CICD pipelines for serverless applications
Raleigh DevDay 2017: Building CICD pipelines for serverless applications
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 

Ähnlich wie Deploying computer vision model as api using aws lambda and api gateway

AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapDaniel Zivkovic
 
Getting Started with AWS Lambda & Serverless Computing
Getting Started with AWS Lambda & Serverless ComputingGetting Started with AWS Lambda & Serverless Computing
Getting Started with AWS Lambda & Serverless ComputingAmazon Web Services
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless ArchitecturesAmazon Web Services
 
Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Amazon Web Services
 
Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversAmazon Web Services
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsAmazon Web Services
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless ArchitectureElana Krasner
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Amazon Web Services
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
Securing Serverless Architectures
Securing Serverless ArchitecturesSecuring Serverless Architectures
Securing Serverless ArchitecturesAmazon Web Services
 
Securing Serverless Architectures - AWS Serverless Web Day
Securing Serverless Architectures - AWS Serverless Web DaySecuring Serverless Architectures - AWS Serverless Web Day
Securing Serverless Architectures - AWS Serverless Web DayAWS Germany
 
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopRaleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopAmazon Web Services
 
Build and run applications without thinking about servers
Build and run applications without thinking about serversBuild and run applications without thinking about servers
Build and run applications without thinking about serversAmazon Web Services
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingAmazon Web Services
 
Securing Serverless Architecture
Securing Serverless ArchitectureSecuring Serverless Architecture
Securing Serverless ArchitectureAmazon Web Services
 
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...Amazon Web Services
 

Ähnlich wie Deploying computer vision model as api using aws lambda and api gateway (20)

AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
 
Getting Started with AWS Lambda & Serverless Computing
Getting Started with AWS Lambda & Serverless ComputingGetting Started with AWS Lambda & Serverless Computing
Getting Started with AWS Lambda & Serverless Computing
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
 
Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM
 
Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about servers
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applications
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Securing Serverless Architectures
Securing Serverless ArchitecturesSecuring Serverless Architectures
Securing Serverless Architectures
 
Securing Serverless Architectures - AWS Serverless Web Day
Securing Serverless Architectures - AWS Serverless Web DaySecuring Serverless Architectures - AWS Serverless Web Day
Securing Serverless Architectures - AWS Serverless Web Day
 
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopRaleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshop
 
Build and run applications without thinking about servers
Build and run applications without thinking about serversBuild and run applications without thinking about servers
Build and run applications without thinking about servers
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
 
Securing Serverless Architecture
Securing Serverless ArchitectureSecuring Serverless Architecture
Securing Serverless Architecture
 
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
 

Kürzlich hochgeladen

7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.pptibrahimabdi22
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制vexqp
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...SOFTTECHHUB
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...HyderabadDolls
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...gajnagarg
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...nirzagarg
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...HyderabadDolls
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...gragchanchal546
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...kumargunjan9515
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样wsppdmt
 

Kürzlich hochgeladen (20)

7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 

Deploying computer vision model as api using aws lambda and api gateway

  • 1. 1 | 5 0 Deploying Computer Vision Model as an API using AWS Lambda & API Gateway
  • 2. 2 | 5 0 Topic Deploying Computer Vision Model as an API using AWS Lambda & API Gateway 2 | 5 0 Speaker SHIRISH GUPTA HEAD – DATA SCIENCE & PARTNERSHIPS AT LOAN2GROW
  • 3. 3 | 5 0 “Awesome. You have created a great machine learning algorithm. Am impressed by the accuracy and love the technique. How can we implement it in our system?” Is this something you have heard multiple times during a client or business meeting but never been able to truthfully answer it? Worry not, this is probably faced by 90% (to be conservative) of fellow data scientists. And AWS has many solutions for it. One of them being — “AWS lambda function integrated with Amazon API gateway”
  • 4. 4 | 5 04 | 5 0 • What are AWS Lambda & Amazon API ? • Overview of our approach • Hands-On Training • Login to AWS Lambda • Understand & create a lambda_function • Download & define layers(aka dependencies) • Configure Amazon API gateway • Deploy the API and test it using Postman or Curl Agenda for Today
  • 5. 5 | 5 0 AWS Lambda AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code. The concept of serverless computing refers to the idea that you don’t need to maintain your own servers to run these functions. Which means you can just upload your codes (Python, Node.js, Go, .NET, Java, Ruby) and Lambda will manage other things like runtime, scaling, load balancing, etc. Amazon API Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the front door for applications to access data, business logic, or functionality from your backend services. Using API Gateway, we can create RESTful APIs and WebSocket APIs that enable real- time two-way communication applications. API Gateway supports containerized and serverless workloads, as well as web applications.
  • 6. 6 | 5 0 Overview of our approa • Write a simple OCR code using OpenCV + Tesseract algorithm in Python language • Configure the algorithm in AWS Lambda • Deploy it as an API on Amazon API gateway 6 | 5 0 OCR or Optical character recognition or optical character reader is the electronic or mechanical conversion of images of typed, handwritten or printed text into machine-encoded text, whether from a scanned document, a photo of a document, a scene-photo or from subtitle text superimposed on an image.
  • 7. 7 | 5 0 OCR or Optical Character RecognitionThe electronic or mechanical conversion of images of typed, handwritten or printed text into machine-encoded text, whether from a scanned document, a photo of a document, a scene-photo or from subtitle text superimposed on an image.
  • 8. 8 | 5 0 Important Notes • The workshop will require you to upload few python libraries as zip files. You can download them from the following link • https://implayers.s3.amazonaws.com/Pillow.zip • https://implayers.s3.amazonaws.com/tesseract- layer.zip • https://implayers.s3.amazonaws.com/pytesseract%3D %3D0.3.3.zip • Python codes & sample photos to test https://drive.google.com/drive/folders/1jVXiI1QzOwaqW ggY-kDGE4WTtsd2mbX5?usp=sharing • Please refer to the following blog for other queries https://towardsdatascience.com/aws-lambda-amazon- api-gateway-not-as-daunting-as-they-sound-part-1- d77b92f53626 Pre-requisites • Python development experience • Basics on Computer Vision and OCR • Activated AWS account (You might need to enter your credit card details to activate the account. Don’t worry you won’t be charged for the same)
  • 9. 9 | 5 0 Let’s jump into the workshop
  • 10. 1 0 | 5 0 Lambda_Function The code (here: python) that runs on AWS Lambda is uploaded as a Lambda function • Event represents the event or trigger that caused the invocation of the lambda. It’s like the input to the function. eg: Lambda function can be triggered by an upload to S3 or by passing some input/data via API Gateway. • Context Provides information about the invocation, and execution environment of your lambda. Can be used to check the memory allocation or to retrieve the number of milliseconds left before the execution times out. It’s like extra or meta info provided by AWS to understand function’s runtime. Layers • Although we have created the lambda function, it won’t execute or run right away. The reason is that we haven’t downloaded or installed the necessary libraries(dependencies) required for the code to run. • Like in a normal environment, we need to pip or conda install the libraries, we will need to do the same thing for AWS lambda. We do that by adding layers to our AWS lambda • A ZIP archive that contains libraries, a custom runtime, or other dependencies. With layers, you can use libraries in your function without needing to include them in your deployment package
  • 11. 1 1 | 5 0 Curl Command curl -X POST --data-binary @bookpage.jpg https://kglyy5173l.execute-api.us-east- 1.amazonaws.com/Testing
  • 12. 1 2 | 5 0 shirish201@gmail.com https://www.facebook.com/shirish .gupta.180/ https://www.linkedin.com/in/shirish -gupta-ba003742/
  • 13. 1 3 | 5 0 Thank you
  • 14. 1 4 | 5 0 Questions