SlideShare une entreprise Scribd logo
1  sur  14
AWS LAMBDA
December 15, 2016
Muhammed Yalçın
CONTENT
 What is AWS Lambda?
 Advantage and Disadvantage of AWS Lambda
 Supported programming languages
 AWS Lambda Function (Node.js)
 AWS Lambda invoke
 Create a Lambda Function
 Pricing
 References
What is AWS Lambda?
 AWS Lambda is an event-driven, serverless computing platform provide by
Amazon as part of the Amazon Web Services.
 It is a compute service that runs code in response to events and automatically
manages the compute resources required by that code.
 It was introduced in 2014.
Advantage and Disadvantage of AWS
Lambda
 Advantages:
 Only pay for the compute time(in milliseconds) used.
 Don’t worry about server, spend more time in writing code.
 Disadvantages:
 Lambda is not well documented.
 Lambda is a building block, not a tool.
 Lambda is terrible at error handling.
Supported programming languages
 Node.js
 Phython
 Java
 C#
AWS Lambda Function (Node.js)
 AWS Lambda function handler has 3 parameters.
 event(first parameter): AWS Lambda uses this parameters to pass data into handler. «event.variableName»
 context(second parameter): AWS Lambda uses this parameters to provide your handler the runtime information of the
Lambda function that is executing. While AWS Lambda function is executing, it can be contact runtime informations.
Such as:
 How much time is remaining before AWS Lambda terminates your Lambda function (timeout is one of the Lambda
function configuration properties).
 The CloudWatch log group and log stream associated with the Lambda function that is executing.
 The AWS request ID returned to the client that invoked the Lambda function. You can use the request ID for any follow up
inquiry with AWS support.
 If the Lambda function is invoked through AWS Mobile SDK, you can learn more about the mobile application calling the
Lambda function.
Con’t
 context(second parameter) can access this runtime information functions.
 callback(third parameter): You can use this optional function to return information to the caller, otherwise return
value is null. Callback function has two parameters.
 « Error error » is an optional parameter that you can use to provide results of the failed Lambda function execution. When a
Lambda function succeeds, you can pass null as the first parameter.
 « Object result » is an optional parameter that you can use to provide the result of a successful function execution. The result
provided must be JSON.stringify compatible. If an error is provided, this parameter is ignored.
Con’t
 Besides you can create your error message.
AWS Lambda invoke
 You can call another lambda function in your lambda function. Remember that
your lambda function must has a permisson from AWS IAM(Identity and Access
Management)
 Firstly you can access aws-sdk and lambda object.
 Then you can call another function by using invoke function.
Create a Lambda Function
 You must have an AWS account. (can be free tier)
 Open AWS Lambda page.
 Then click Create a Lambda function.
 Select a blueprint. (You can select Blank Function or etc.)
 Configure Trigger
 You can select a trigger that invokes your lambda function.
 These triggers can be: API Gateway, AWS IoT, CloudFront, CloudWatch Events-Schedule, CloudWatch Logs, CodeCommit, Cognito Sync Trigger, DynamoDB, Kinesis, S3, SNS.
 Click Next.
 You must enter a name for your lambda function.
 You must select a programming language from Runtime text block.
 You can enter your code by selecting Edit Code Inline from Code Entry Type. Otherwise you can upload a .zip file(import your code) or upload file from AWS S3.
 You can enter handler name or default index.handler (it calls export.handler in your code)
 You must select a role. Role can be created or use existing one. You can select one of them. These roles could be defined in IAM(Identity and Access Management)
 You must determine memory and timeout for your lambda function. Your function is allocated CPU and memory.
 Then you can click Next and Create Function.
Con’t
Con’t
 You can test the code written. And you can see the execution results.
Pricing
 The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month.
 First 1 million requests per month are free
 $0.20 per 1 million requests thereafter ($0.0000002 per request)
 Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest
100ms. The price depends on the amount of memory you allocate to your function. You are charged $0.00001667 for every GB-second
used.
 Example:
 128MB of memory, executed 25M times in one month, runs for 200ms each time
 Total compute (seconds) = 25M * (0.2sec) = 5M seconds
 Total monthly compute usage (GB-s) = 5M seconds * (128MB/1024) = 625,000 GB-s
 The monthly compute price is $0.00001667 per GB-s and the free tier provides 400,000 GB-s.
 Monthly charged compute usage = Total monthly compute usage – Free tier usage
 Monthly charged compute usage = 625,000 – 400,000 = 225,000 GB-s
 Monthly compute charges = 225,000 * 0.00001667 = $3,75075
 Cheap? yeap
References
 http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html
 https://en.wikipedia.org/wiki/AWS_Lambda
 https://aws.amazon.com/lambda/pricing/
 https://www.datawire.io/3-reasons-aws-lambda-not-ready-prime-time/
 https://www.iopipe.com/what-is-amazon-lambda/

Contenu connexe

Tendances

AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAmazon Web Services
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda FundamentalsPiyush Agrawal
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)Ashish Kushwaha
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsAmazon Web Services
 
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...Edureka!
 
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatchAmazon Web Services
 
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...Amazon Web Services
 
(CMP201) All You Need To Know About Auto Scaling
(CMP201) All You Need To Know About Auto Scaling(CMP201) All You Need To Know About Auto Scaling
(CMP201) All You Need To Know About Auto ScalingAmazon Web Services
 
AWS Web Application Firewall and AWS Shield - Webinar
AWS Web Application Firewall and AWS Shield - Webinar AWS Web Application Firewall and AWS Shield - Webinar
AWS Web Application Firewall and AWS Shield - Webinar Amazon Web Services
 

Tendances (20)

AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless Cloud
 
Intro to AWS Lambda
Intro to AWS Lambda Intro to AWS Lambda
Intro to AWS Lambda
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda Fundamentals
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
Introduction of AWS KMS
Introduction of AWS KMSIntroduction of AWS KMS
Introduction of AWS KMS
 
Serverless computing
Serverless computingServerless computing
Serverless computing
 
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
 
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
 
(CMP201) All You Need To Know About Auto Scaling
(CMP201) All You Need To Know About Auto Scaling(CMP201) All You Need To Know About Auto Scaling
(CMP201) All You Need To Know About Auto Scaling
 
Intro to Amazon ECS
Intro to Amazon ECSIntro to Amazon ECS
Intro to Amazon ECS
 
Security Architectures on AWS
Security Architectures on AWSSecurity Architectures on AWS
Security Architectures on AWS
 
AWS Web Application Firewall and AWS Shield - Webinar
AWS Web Application Firewall and AWS Shield - Webinar AWS Web Application Firewall and AWS Shield - Webinar
AWS Web Application Firewall and AWS Shield - Webinar
 
AWS SQS SNS
AWS SQS SNSAWS SQS SNS
AWS SQS SNS
 
AWS Security Best Practices
AWS Security Best PracticesAWS Security Best Practices
AWS Security Best Practices
 
AWS Technical Essentials Day
AWS Technical Essentials DayAWS Technical Essentials Day
AWS Technical Essentials Day
 

En vedette

Sites de distribution illégale, noms de domaine et intermédiaires de paiement
Sites de distribution illégale, noms de domaine et intermédiaires de paiementSites de distribution illégale, noms de domaine et intermédiaires de paiement
Sites de distribution illégale, noms de domaine et intermédiaires de paiementCedric Manara
 
Unfolding Data - Interaction Design for Visualizations of Geospatial Data
Unfolding Data - Interaction Design for Visualizations of Geospatial DataUnfolding Data - Interaction Design for Visualizations of Geospatial Data
Unfolding Data - Interaction Design for Visualizations of Geospatial DataTill Nagel
 
Towards a General Approach for Symbolic Model-Checker Prototyping
Towards a General Approach for Symbolic Model-Checker PrototypingTowards a General Approach for Symbolic Model-Checker Prototyping
Towards a General Approach for Symbolic Model-Checker PrototypingEdmundo López Bóbeda
 
Unfolding the City - Urban Mobility Visualizations
Unfolding the City - Urban Mobility VisualizationsUnfolding the City - Urban Mobility Visualizations
Unfolding the City - Urban Mobility VisualizationsTill Nagel
 
The Smiley Model - Concept Model for designing engaging and motivating game...
The Smiley Model  -  Concept Model for designing engaging and motivating game...The Smiley Model  -  Concept Model for designing engaging and motivating game...
The Smiley Model - Concept Model for designing engaging and motivating game...CharlotteLarke
 
Debra Shepard masccc 2013
Debra Shepard masccc 2013Debra Shepard masccc 2013
Debra Shepard masccc 2013Jen Boudrie
 
AWS re:Invent 2016: Security Automation: Spend Less Time Securing Your Applic...
AWS re:Invent 2016: Security Automation: Spend Less Time Securing Your Applic...AWS re:Invent 2016: Security Automation: Spend Less Time Securing Your Applic...
AWS re:Invent 2016: Security Automation: Spend Less Time Securing Your Applic...Amazon Web Services
 
AWS re:Invent 2016: Evolving an Enterprise-Level Compliance Framework with Am...
AWS re:Invent 2016: Evolving an Enterprise-Level Compliance Framework with Am...AWS re:Invent 2016: Evolving an Enterprise-Level Compliance Framework with Am...
AWS re:Invent 2016: Evolving an Enterprise-Level Compliance Framework with Am...Amazon Web Services
 
How I learned to stop worrying and love the cloud
How I learned to stop worrying and love the cloudHow I learned to stop worrying and love the cloud
How I learned to stop worrying and love the cloudShlomo Swidler
 
What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?Amazon Web Services
 
Introduction to AWS Cloud Computing
Introduction to AWS Cloud ComputingIntroduction to AWS Cloud Computing
Introduction to AWS Cloud ComputingAmazon Web Services
 
AWS 101: Cloud Computing Seminar (2012)
AWS 101: Cloud Computing Seminar (2012)AWS 101: Cloud Computing Seminar (2012)
AWS 101: Cloud Computing Seminar (2012)Amazon Web Services
 

En vedette (20)

AWS API Gateway
AWS API GatewayAWS API Gateway
AWS API Gateway
 
Webrtc and tokbox
Webrtc and tokboxWebrtc and tokbox
Webrtc and tokbox
 
Socketio
SocketioSocketio
Socketio
 
Sites de distribution illégale, noms de domaine et intermédiaires de paiement
Sites de distribution illégale, noms de domaine et intermédiaires de paiementSites de distribution illégale, noms de domaine et intermédiaires de paiement
Sites de distribution illégale, noms de domaine et intermédiaires de paiement
 
Unfolding Data - Interaction Design for Visualizations of Geospatial Data
Unfolding Data - Interaction Design for Visualizations of Geospatial DataUnfolding Data - Interaction Design for Visualizations of Geospatial Data
Unfolding Data - Interaction Design for Visualizations of Geospatial Data
 
Designing concepts
Designing conceptsDesigning concepts
Designing concepts
 
Towards a General Approach for Symbolic Model-Checker Prototyping
Towards a General Approach for Symbolic Model-Checker PrototypingTowards a General Approach for Symbolic Model-Checker Prototyping
Towards a General Approach for Symbolic Model-Checker Prototyping
 
Unfolding the City - Urban Mobility Visualizations
Unfolding the City - Urban Mobility VisualizationsUnfolding the City - Urban Mobility Visualizations
Unfolding the City - Urban Mobility Visualizations
 
The Smiley Model - Concept Model for designing engaging and motivating game...
The Smiley Model  -  Concept Model for designing engaging and motivating game...The Smiley Model  -  Concept Model for designing engaging and motivating game...
The Smiley Model - Concept Model for designing engaging and motivating game...
 
Debra Shepard masccc 2013
Debra Shepard masccc 2013Debra Shepard masccc 2013
Debra Shepard masccc 2013
 
AWS 101 Guide
AWS 101 GuideAWS 101 Guide
AWS 101 Guide
 
Of Lambdas and LINQ
Of Lambdas and LINQOf Lambdas and LINQ
Of Lambdas and LINQ
 
AWS re:Invent 2016: Security Automation: Spend Less Time Securing Your Applic...
AWS re:Invent 2016: Security Automation: Spend Less Time Securing Your Applic...AWS re:Invent 2016: Security Automation: Spend Less Time Securing Your Applic...
AWS re:Invent 2016: Security Automation: Spend Less Time Securing Your Applic...
 
Migrating to aws
Migrating to awsMigrating to aws
Migrating to aws
 
AWS re:Invent 2016: Evolving an Enterprise-Level Compliance Framework with Am...
AWS re:Invent 2016: Evolving an Enterprise-Level Compliance Framework with Am...AWS re:Invent 2016: Evolving an Enterprise-Level Compliance Framework with Am...
AWS re:Invent 2016: Evolving an Enterprise-Level Compliance Framework with Am...
 
How I learned to stop worrying and love the cloud
How I learned to stop worrying and love the cloudHow I learned to stop worrying and love the cloud
How I learned to stop worrying and love the cloud
 
What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?
 
Break Even Analysis
Break Even AnalysisBreak Even Analysis
Break Even Analysis
 
Introduction to AWS Cloud Computing
Introduction to AWS Cloud ComputingIntroduction to AWS Cloud Computing
Introduction to AWS Cloud Computing
 
AWS 101: Cloud Computing Seminar (2012)
AWS 101: Cloud Computing Seminar (2012)AWS 101: Cloud Computing Seminar (2012)
AWS 101: Cloud Computing Seminar (2012)
 

Similaire à AWS Lambda

AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...Amazon Web Services
 
Introduction to Aws lambda and build first application | Namespace IT
Introduction to Aws lambda and build first application | Namespace ITIntroduction to Aws lambda and build first application | Namespace IT
Introduction to Aws lambda and build first application | Namespace ITnamespaceit
 
(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data WorkloadsAmazon 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
 
February 2016 Webinar Series - Introducing VPC Support for AWS Lambda
February 2016 Webinar Series - Introducing VPC Support for AWS LambdaFebruary 2016 Webinar Series - Introducing VPC Support for AWS Lambda
February 2016 Webinar Series - Introducing VPC Support for AWS LambdaAmazon Web Services
 
AWS Lambda Tutorial
AWS Lambda TutorialAWS Lambda Tutorial
AWS Lambda TutorialWhizlabs
 
Introduction to AWS lambda & Serverless Application1.pptx
Introduction to AWS lambda & Serverless Application1.pptxIntroduction to AWS lambda & Serverless Application1.pptx
Introduction to AWS lambda & Serverless Application1.pptxMohammed Shefeeq
 
Introduce AWS Lambda for newbie and Non-IT
Introduce AWS Lambda for newbie and Non-ITIntroduce AWS Lambda for newbie and Non-IT
Introduce AWS Lambda for newbie and Non-ITChitpong Wuttanan
 
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
 
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
 
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaRyan Cuprak
 
Lambda and DynamoDB best practices
Lambda and DynamoDB best practicesLambda and DynamoDB best practices
Lambda and DynamoDB best practicesYan Cui
 
Amazon Web Services lection 5
Amazon Web Services lection 5  Amazon Web Services lection 5
Amazon Web Services lection 5 Binary Studio
 
AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)Doguhan Uluca
 
AWS Lambda Functions A Comprehensive Guide
AWS Lambda Functions A Comprehensive GuideAWS Lambda Functions A Comprehensive Guide
AWS Lambda Functions A Comprehensive GuideInexture Solutions
 
Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Mike Shutlar
 
Getting started with AWS Lambda
Getting started with AWS LambdaGetting started with AWS Lambda
Getting started with AWS LambdaMindfire LLC
 
Intro To Serverless Application Architecture: Collision 2018
Intro To Serverless Application Architecture: Collision 2018Intro To Serverless Application Architecture: Collision 2018
Intro To Serverless Application Architecture: Collision 2018Amazon Web Services
 
Introduction to AWS Lambda with Python
Introduction to AWS Lambda with PythonIntroduction to AWS Lambda with Python
Introduction to AWS Lambda with Pythonadaplo
 

Similaire à AWS Lambda (20)

AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
 
AWS Lambda Features and Uses
AWS Lambda Features and UsesAWS Lambda Features and Uses
AWS Lambda Features and Uses
 
Introduction to Aws lambda and build first application | Namespace IT
Introduction to Aws lambda and build first application | Namespace ITIntroduction to Aws lambda and build first application | Namespace IT
Introduction to Aws lambda and build first application | Namespace IT
 
(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads
 
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
 
February 2016 Webinar Series - Introducing VPC Support for AWS Lambda
February 2016 Webinar Series - Introducing VPC Support for AWS LambdaFebruary 2016 Webinar Series - Introducing VPC Support for AWS Lambda
February 2016 Webinar Series - Introducing VPC Support for AWS Lambda
 
AWS Lambda Tutorial
AWS Lambda TutorialAWS Lambda Tutorial
AWS Lambda Tutorial
 
Introduction to AWS lambda & Serverless Application1.pptx
Introduction to AWS lambda & Serverless Application1.pptxIntroduction to AWS lambda & Serverless Application1.pptx
Introduction to AWS lambda & Serverless Application1.pptx
 
Introduce AWS Lambda for newbie and Non-IT
Introduce AWS Lambda for newbie and Non-ITIntroduce AWS Lambda for newbie and Non-IT
Introduce AWS Lambda for newbie and Non-IT
 
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
 
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
 
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
 
Lambda and DynamoDB best practices
Lambda and DynamoDB best practicesLambda and DynamoDB best practices
Lambda and DynamoDB best practices
 
Amazon Web Services lection 5
Amazon Web Services lection 5  Amazon Web Services lection 5
Amazon Web Services lection 5
 
AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)AWS Lambda Presentation (Tech Talk DC)
AWS Lambda Presentation (Tech Talk DC)
 
AWS Lambda Functions A Comprehensive Guide
AWS Lambda Functions A Comprehensive GuideAWS Lambda Functions A Comprehensive Guide
AWS Lambda Functions A Comprehensive Guide
 
Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017
 
Getting started with AWS Lambda
Getting started with AWS LambdaGetting started with AWS Lambda
Getting started with AWS Lambda
 
Intro To Serverless Application Architecture: Collision 2018
Intro To Serverless Application Architecture: Collision 2018Intro To Serverless Application Architecture: Collision 2018
Intro To Serverless Application Architecture: Collision 2018
 
Introduction to AWS Lambda with Python
Introduction to AWS Lambda with PythonIntroduction to AWS Lambda with Python
Introduction to AWS Lambda with Python
 

Dernier

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 

Dernier (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

AWS Lambda

  • 1. AWS LAMBDA December 15, 2016 Muhammed Yalçın
  • 2. CONTENT  What is AWS Lambda?  Advantage and Disadvantage of AWS Lambda  Supported programming languages  AWS Lambda Function (Node.js)  AWS Lambda invoke  Create a Lambda Function  Pricing  References
  • 3. What is AWS Lambda?  AWS Lambda is an event-driven, serverless computing platform provide by Amazon as part of the Amazon Web Services.  It is a compute service that runs code in response to events and automatically manages the compute resources required by that code.  It was introduced in 2014.
  • 4. Advantage and Disadvantage of AWS Lambda  Advantages:  Only pay for the compute time(in milliseconds) used.  Don’t worry about server, spend more time in writing code.  Disadvantages:  Lambda is not well documented.  Lambda is a building block, not a tool.  Lambda is terrible at error handling.
  • 5. Supported programming languages  Node.js  Phython  Java  C#
  • 6. AWS Lambda Function (Node.js)  AWS Lambda function handler has 3 parameters.  event(first parameter): AWS Lambda uses this parameters to pass data into handler. «event.variableName»  context(second parameter): AWS Lambda uses this parameters to provide your handler the runtime information of the Lambda function that is executing. While AWS Lambda function is executing, it can be contact runtime informations. Such as:  How much time is remaining before AWS Lambda terminates your Lambda function (timeout is one of the Lambda function configuration properties).  The CloudWatch log group and log stream associated with the Lambda function that is executing.  The AWS request ID returned to the client that invoked the Lambda function. You can use the request ID for any follow up inquiry with AWS support.  If the Lambda function is invoked through AWS Mobile SDK, you can learn more about the mobile application calling the Lambda function.
  • 7. Con’t  context(second parameter) can access this runtime information functions.  callback(third parameter): You can use this optional function to return information to the caller, otherwise return value is null. Callback function has two parameters.  « Error error » is an optional parameter that you can use to provide results of the failed Lambda function execution. When a Lambda function succeeds, you can pass null as the first parameter.  « Object result » is an optional parameter that you can use to provide the result of a successful function execution. The result provided must be JSON.stringify compatible. If an error is provided, this parameter is ignored.
  • 8. Con’t  Besides you can create your error message.
  • 9. AWS Lambda invoke  You can call another lambda function in your lambda function. Remember that your lambda function must has a permisson from AWS IAM(Identity and Access Management)  Firstly you can access aws-sdk and lambda object.  Then you can call another function by using invoke function.
  • 10. Create a Lambda Function  You must have an AWS account. (can be free tier)  Open AWS Lambda page.  Then click Create a Lambda function.  Select a blueprint. (You can select Blank Function or etc.)  Configure Trigger  You can select a trigger that invokes your lambda function.  These triggers can be: API Gateway, AWS IoT, CloudFront, CloudWatch Events-Schedule, CloudWatch Logs, CodeCommit, Cognito Sync Trigger, DynamoDB, Kinesis, S3, SNS.  Click Next.  You must enter a name for your lambda function.  You must select a programming language from Runtime text block.  You can enter your code by selecting Edit Code Inline from Code Entry Type. Otherwise you can upload a .zip file(import your code) or upload file from AWS S3.  You can enter handler name or default index.handler (it calls export.handler in your code)  You must select a role. Role can be created or use existing one. You can select one of them. These roles could be defined in IAM(Identity and Access Management)  You must determine memory and timeout for your lambda function. Your function is allocated CPU and memory.  Then you can click Next and Create Function.
  • 12. Con’t  You can test the code written. And you can see the execution results.
  • 13. Pricing  The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month.  First 1 million requests per month are free  $0.20 per 1 million requests thereafter ($0.0000002 per request)  Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest 100ms. The price depends on the amount of memory you allocate to your function. You are charged $0.00001667 for every GB-second used.  Example:  128MB of memory, executed 25M times in one month, runs for 200ms each time  Total compute (seconds) = 25M * (0.2sec) = 5M seconds  Total monthly compute usage (GB-s) = 5M seconds * (128MB/1024) = 625,000 GB-s  The monthly compute price is $0.00001667 per GB-s and the free tier provides 400,000 GB-s.  Monthly charged compute usage = Total monthly compute usage – Free tier usage  Monthly charged compute usage = 625,000 – 400,000 = 225,000 GB-s  Monthly compute charges = 225,000 * 0.00001667 = $3,75075  Cheap? yeap
  • 14. References  http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html  https://en.wikipedia.org/wiki/AWS_Lambda  https://aws.amazon.com/lambda/pricing/  https://www.datawire.io/3-reasons-aws-lambda-not-ready-prime-time/  https://www.iopipe.com/what-is-amazon-lambda/