SlideShare a Scribd company logo
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/

More Related Content

What's hot

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
Amazon Web Services
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
Scott Leberknight
 
Deep Dive on AWS Lambda
Deep Dive on AWS LambdaDeep Dive on AWS Lambda
Deep Dive on AWS Lambda
Amazon Web Services
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)
Ashish Kushwaha
 
AWS Lambda Features and Uses
AWS Lambda Features and UsesAWS Lambda Features and Uses
AWS Lambda Features and Uses
GlobalLogic Ukraine
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
Amazon Web Services
 
A Brief Look at Serverless Architecture
A Brief Look at Serverless ArchitectureA Brief Look at Serverless Architecture
A Brief Look at Serverless Architecture
Amazon Web Services
 
AWS RDS
AWS RDSAWS RDS
AWS RDS
Mahesh Raj
 
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
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
Nikolaus Graf
 
A Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS LambdaA Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS Lambda
Amazon Web Services
 
Getting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessGetting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and Serverless
Amazon Web Services
 
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
Chitpong Wuttanan
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
Amazon Web Services
 
AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019
Amazon Web Services
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
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 servers
Amazon Web Services
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda Fundamentals
Piyush Agrawal
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
Elana Krasner
 
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Amazon Web Services
 

What's hot (20)

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
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Deep Dive on AWS Lambda
Deep Dive on AWS LambdaDeep Dive on AWS Lambda
Deep Dive on AWS Lambda
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)
 
AWS Lambda Features and Uses
AWS Lambda Features and UsesAWS Lambda Features and Uses
AWS Lambda Features and Uses
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
A Brief Look at Serverless Architecture
A Brief Look at Serverless ArchitectureA Brief Look at Serverless Architecture
A Brief Look at Serverless Architecture
 
AWS RDS
AWS RDSAWS RDS
AWS RDS
 
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...
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
A Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS LambdaA Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS Lambda
 
Getting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessGetting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and Serverless
 
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
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
 
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
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda Fundamentals
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
 

Viewers also liked

AWS API Gateway
AWS API GatewayAWS API Gateway
AWS API Gateway
Muhammed YALÇIN
 
Webrtc and tokbox
Webrtc and tokboxWebrtc and tokbox
Webrtc and tokbox
Muhammed YALÇIN
 
Socketio
SocketioSocketio
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
Cedric 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 Data
Till Nagel
 
Designing concepts
Designing conceptsDesigning concepts
Designing concepts
Mohanned Ezz El-Din
 
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
Edmundo 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 Visualizations
Till 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 2013
Jen Boudrie
 
AWS 101 Guide
AWS 101 GuideAWS 101 Guide
AWS 101 Guide
Richard Harvey
 
Of Lambdas and LINQ
Of Lambdas and LINQOf Lambdas and LINQ
Of Lambdas and LINQ
BlackRabbitCoder
 
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
 
Migrating to aws
Migrating to awsMigrating to aws
Migrating to aws
IT Expert Club
 
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 cloud
Shlomo 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
 
Break Even Analysis
Break Even AnalysisBreak Even Analysis
Break Even Analysis
yogesh raghuwanshi
 
Introduction to AWS Cloud Computing
Introduction to AWS Cloud ComputingIntroduction to AWS Cloud Computing
Introduction to AWS Cloud Computing
Amazon 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
 

Viewers also liked (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)
 

Similar to 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 IT
namespaceit
 
(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
Amazon 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 Cloud
Amazon 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 Lambda
Amazon Web Services
 
AWS Lambda Tutorial
AWS Lambda TutorialAWS Lambda Tutorial
AWS Lambda Tutorial
Whizlabs
 
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
Mohammed Shefeeq
 
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
Amazon 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 servers
Amazon 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 Lambda
Ryan Cuprak
 
Lambda and DynamoDB best practices
Lambda and DynamoDB best practicesLambda and DynamoDB best practices
Lambda and DynamoDB best practices
Yan 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 Guide
Inexture 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 2017
Mike Shutlar
 
Getting started with AWS Lambda
Getting started with AWS LambdaGetting started with AWS Lambda
Getting started with AWS Lambda
Mindfire 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 2018
Amazon Web Services
 
Introduction to AWS Lambda with Python
Introduction to AWS Lambda with PythonIntroduction to AWS Lambda with Python
Introduction to AWS Lambda with Python
adaplo
 
Migrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformMigrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless Platform
Amazon Web Services
 
Webinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
Webinar: Serverless Architectures with AWS Lambda and MongoDB AtlasWebinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
Webinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
MongoDB
 

Similar to 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...
 
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
 
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
 
Migrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformMigrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless Platform
 
Webinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
Webinar: Serverless Architectures with AWS Lambda and MongoDB AtlasWebinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
Webinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
 

Recently uploaded

Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
anfaltahir1010
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 

Recently uploaded (20)

Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 

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/