SlideShare a Scribd company logo
AWS LAMBDA
And The Serverless Cloud
Muhammet Arslan
Software Developer @Sony
This document prepared for BBS on 14th May, 2016 Sony
Write
Your Code
And That’s All!
Never think about;
Servers
Or
Os
Or
Scalability
Or
Durability
LAMBDA
Write / Upload
your code to
AWS Lambda
Trigger the AWS
from other AWS
services like S3,
Api Gateway,
Dynamodb…
Lambda only runs
your code when
triggering and
uses only
compute
resources needed
Pay for the
compute time
you use1
CLEAR
Photo is uploaded to S3 by
web server
Lambda automaticaly
triggered by AWS S3 service
Deployed «Lambda» code
runs and resizes the photo
BENEFITS
EXECUTION
• Linux kernel version : 4.1.19-24.31.amzn1.x86_64
Supporting Languages and RUNTIME Versions
• Node.js: v0.10.36, v4.3.2 (recommended)
• Java: Java 8
• Python: Python 2.7
Already-Installed Libraries
• Node.js: Imagick, Aws SDK
• Java: NOTHING!
• Python: AWS SDK (boto3)
SERVICES
S3
DynamoDB
Kinesis
SNS
SES
COGNITO
CloudWatch
CloudFormation
Config
FUNCTION
The Push Event Model
• Publish events to AWS Lambda and Directly invoke
S3
Cognito
SNS
ECHO
Custom App
FUNCTION
The Pull Event Model
AWS Lambda polls an event source and
invokes your Lambda function when the service
detects new events
DynamoDB
Kinesis
LIMITATIONS
Ephmeral Disk Capacity512 MB
Number of processes and threads
1024
Maximum execution duration per request
300 Sec
Invoke request body payload size (RequestResponse)
6 MB
Invoke request body payload size (Event)
128 K
Invoke response body payload size (RequestResponse)
6 MB
NETFLIX
Delivered 7 million hours of video to 50 million customers in 60 countries per quarter
Studios pushes
videos to Netflix
frequently
Before Lambda!
Over the Santa systems’
Netflix process file (5
minutes chunks for paralel
processing) and repackage
And deploy to
watched by users!
After Lambda!
Studios pushes
videos to S3, via
Aspera
S3 Trigger lambda to
start the process (
process the file,
repackage and deploy)
LIFE
The developed code, on the Sony Bbs Meeting, uploaded to,
http://github.com/geass/sony-bbs-lambda
• User uploads an image from administration area (was developed with PHP)
• Administration system uploads image to AWS S3 BUCKET
• S3 Invokes the lambda to fetch & resize Images
• Lambda fetch & resize & upload images to same bucket
• And Show the resized versions on Web Site
COSTS
Request Duration
• First 1 million requests
per month are free
• $0.20 per 1 million
requests thereafter
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. »
COSTS
Memory (MB) Free tier seconds per month Price per 100ms ($)
128 3,200,000 0.000000208
192 2,133,333 0.000000313
256 1,600,000 0.000000417
320 1,280,000 0.000000521
384 1,066,667 0.000000625
448 914,286 0.000000729
512 800,000 0.000000834
576 711,111 0.000000938
640 640,000 0.000001042
704 581,818 0.000001146
768 533,333 0.000001250
832 492,308 0.000001354
896 457,143 0.000001459
960 426,667 0.000001563
1024 400,000 0.000001667
1088 376,471 0.000001771
1152 355,556 0.000001875
1216 336,842 0.000001980
1280 320,000 0.000002084
1344
304,762 0.000002188
1408
290,909 0.000002292
1472 278,261 0.000002396
1536 266,667 0.000002501
EXAMPLE If you allocated 512MB of memory to your function, executed it 3 million times in
one month, and it ran for 1 second each time, your charges would be calculated as
follows:
Monthly compute charges
The monthly compute price: $0.00001667 per GB-s
The free tier : 400,000 GB-s.
Total compute (seconds) = 3M * (1s) = 3,000,000 seconds
512MB/1024 = 1,500,000 GB-s
1,500,000 GB-s – 400,000 free tier GB-s = 1,100,000 GB-s
Monthly compute charges:
1,100,000 * $0.00001667 = $18.34
Monthly request charges
The monthly request price is $0.20 per 1 million requests and
the free tier provides 1M requests per month.
3M requests – 1M free tier requests = 2M Monthly billable requests
Monthly request charges:
2M * $0.2/M = $0.40
Total
Total charges = Compute charges + Request charges:
$18.34 + $0.40 = $18.74 per month
http://github.com/geass/sony-bbs-lambda
Muhammet Arslan
Software Developer @Sony
Thank You!
Ad

More Related Content

Viewers also liked (12)

Pdhpe slideshow
Pdhpe slideshowPdhpe slideshow
Pdhpe slideshow
lauratoulantas
 
Concept of relationship building
Concept of relationship buildingConcept of relationship building
Concept of relationship building
University of the Punjab, Pakistan
 
Ucasa lpowerpoint
Ucasa lpowerpointUcasa lpowerpoint
Ucasa lpowerpoint
roxi2014
 
ZomiSys
ZomiSysZomiSys
ZomiSys
Vasanth R
 
PTCL_Report
PTCL_ReportPTCL_Report
PTCL_Report
ali5344
 
Habitbull
HabitbullHabitbull
Habitbull
Jakob Danelund
 
Aravind adiga by anurag
Aravind adiga by anuragAravind adiga by anurag
Aravind adiga by anurag
Anurag Minz
 
Submission of second semi fiscal report
Submission of second semi fiscal reportSubmission of second semi fiscal report
Submission of second semi fiscal report
Mahboob Ali
 
Grass Mats
Grass MatsGrass Mats
Grass Mats
Gymfloor02
 
Data Handling
Data HandlingData Handling
Data Handling
Hemant Karakoti
 
Presentation 2
Presentation 2Presentation 2
Presentation 2
mjdub89
 
Salesmash
SalesmashSalesmash
Salesmash
Daniel Galper
 

Similar to Aws Lambda and Serverless Cloud (7)

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
 
Serverless Microservices w/ AWS Lambda and node.js
Serverless Microservices w/ AWS Lambda and node.jsServerless Microservices w/ AWS Lambda and node.js
Serverless Microservices w/ AWS Lambda and node.js
Frank Valcarcel
 
Serverless applications
Serverless applicationsServerless applications
Serverless applications
mbaric
 
Developing serverless applications with .NET on AWS
Developing serverless applications with .NET on AWSDeveloping serverless applications with .NET on AWS
Developing serverless applications with .NET on AWS
Woody Pewitt
 
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
 
From Serverless to InterCloud
From Serverless to InterCloudFrom Serverless to InterCloud
From Serverless to InterCloud
Wayne Scarano
 
Serverless Node.js
Serverless Node.jsServerless Node.js
Serverless Node.js
The Software House
 
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
 
Serverless Microservices w/ AWS Lambda and node.js
Serverless Microservices w/ AWS Lambda and node.jsServerless Microservices w/ AWS Lambda and node.js
Serverless Microservices w/ AWS Lambda and node.js
Frank Valcarcel
 
Serverless applications
Serverless applicationsServerless applications
Serverless applications
mbaric
 
Developing serverless applications with .NET on AWS
Developing serverless applications with .NET on AWSDeveloping serverless applications with .NET on AWS
Developing serverless applications with .NET on AWS
Woody Pewitt
 
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
 
From Serverless to InterCloud
From Serverless to InterCloudFrom Serverless to InterCloud
From Serverless to InterCloud
Wayne Scarano
 
Ad

Recently uploaded (20)

HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Ad

Aws Lambda and Serverless Cloud

  • 1. AWS LAMBDA And The Serverless Cloud Muhammet Arslan Software Developer @Sony This document prepared for BBS on 14th May, 2016 Sony
  • 2. Write Your Code And That’s All! Never think about; Servers Or Os Or Scalability Or Durability
  • 3. LAMBDA Write / Upload your code to AWS Lambda Trigger the AWS from other AWS services like S3, Api Gateway, Dynamodb… Lambda only runs your code when triggering and uses only compute resources needed Pay for the compute time you use1
  • 4. CLEAR Photo is uploaded to S3 by web server Lambda automaticaly triggered by AWS S3 service Deployed «Lambda» code runs and resizes the photo
  • 6. EXECUTION • Linux kernel version : 4.1.19-24.31.amzn1.x86_64 Supporting Languages and RUNTIME Versions • Node.js: v0.10.36, v4.3.2 (recommended) • Java: Java 8 • Python: Python 2.7 Already-Installed Libraries • Node.js: Imagick, Aws SDK • Java: NOTHING! • Python: AWS SDK (boto3)
  • 8. FUNCTION The Push Event Model • Publish events to AWS Lambda and Directly invoke S3 Cognito SNS ECHO Custom App
  • 9. FUNCTION The Pull Event Model AWS Lambda polls an event source and invokes your Lambda function when the service detects new events DynamoDB Kinesis
  • 10. LIMITATIONS Ephmeral Disk Capacity512 MB Number of processes and threads 1024 Maximum execution duration per request 300 Sec Invoke request body payload size (RequestResponse) 6 MB Invoke request body payload size (Event) 128 K Invoke response body payload size (RequestResponse) 6 MB
  • 11. NETFLIX Delivered 7 million hours of video to 50 million customers in 60 countries per quarter Studios pushes videos to Netflix frequently Before Lambda! Over the Santa systems’ Netflix process file (5 minutes chunks for paralel processing) and repackage And deploy to watched by users! After Lambda! Studios pushes videos to S3, via Aspera S3 Trigger lambda to start the process ( process the file, repackage and deploy)
  • 12. LIFE The developed code, on the Sony Bbs Meeting, uploaded to, http://github.com/geass/sony-bbs-lambda • User uploads an image from administration area (was developed with PHP) • Administration system uploads image to AWS S3 BUCKET • S3 Invokes the lambda to fetch & resize Images • Lambda fetch & resize & upload images to same bucket • And Show the resized versions on Web Site
  • 13. COSTS Request Duration • First 1 million requests per month are free • $0.20 per 1 million requests thereafter 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. »
  • 14. COSTS Memory (MB) Free tier seconds per month Price per 100ms ($) 128 3,200,000 0.000000208 192 2,133,333 0.000000313 256 1,600,000 0.000000417 320 1,280,000 0.000000521 384 1,066,667 0.000000625 448 914,286 0.000000729 512 800,000 0.000000834 576 711,111 0.000000938 640 640,000 0.000001042 704 581,818 0.000001146 768 533,333 0.000001250 832 492,308 0.000001354 896 457,143 0.000001459 960 426,667 0.000001563 1024 400,000 0.000001667 1088 376,471 0.000001771 1152 355,556 0.000001875 1216 336,842 0.000001980 1280 320,000 0.000002084 1344 304,762 0.000002188 1408 290,909 0.000002292 1472 278,261 0.000002396 1536 266,667 0.000002501
  • 15. EXAMPLE If you allocated 512MB of memory to your function, executed it 3 million times in one month, and it ran for 1 second each time, your charges would be calculated as follows: Monthly compute charges The monthly compute price: $0.00001667 per GB-s The free tier : 400,000 GB-s. Total compute (seconds) = 3M * (1s) = 3,000,000 seconds 512MB/1024 = 1,500,000 GB-s 1,500,000 GB-s – 400,000 free tier GB-s = 1,100,000 GB-s Monthly compute charges: 1,100,000 * $0.00001667 = $18.34 Monthly request charges The monthly request price is $0.20 per 1 million requests and the free tier provides 1M requests per month. 3M requests – 1M free tier requests = 2M Monthly billable requests Monthly request charges: 2M * $0.2/M = $0.40 Total Total charges = Compute charges + Request charges: $18.34 + $0.40 = $18.74 per month