SlideShare a Scribd company logo
AWS Lambda
What, why, when, how?
What is Lambda?
Compute service where you
don't think about…
Servers
Capacity
Deployments
Scaling
Fault tolerance
Metrics and logging
Automatic OS and
language updates
All of that is taken care of
automatically
You can easily…
Bring your own code,
including native libraries
Run code in parallel
Lambda use cases
Create backends
Create event handlers
Create data
processing systems
Serverless
Event-driven scale
100ms billing units
You never pay for idle!
How it works
Upload code in a zip file
Code can be…
v0.10 & v4.3 Java 8 v2.7
Code is stateless,
persistence goes elsewhere
Monitoring and logging
handled automatically by
CloudWatch
Integrates with other
AWS services
S3
DynamoDB
RDS
VPC
CloudWatch
CloudFormation
Cognito SNSAPI Gateway
SES
SWF
Kinesis CloudTrail
CloudWatch
All these & more…
Compute Power
23 "power levels"
Specified in Lambda
as memory
From 128MB
To 1.5GB
More memory = More CPU
Price scales with
power level
Pricing per 100ms
(rounded up to nearest 100ms)
Run durations from
100ms to 5 minutes
For compute intensive tasks
set power level higher
For I/O intensive tasks
set power level lower
Event Sources
• S3
• Schedule events
• AWS IoT
• CloudWatch
• DynamoDB
• Kinesis
• SNS
• API Gateway
(sort of)
“Serverless” API’s with
AWS API Gateway & Lambda
Versioning
By using versioning
nothing changes
But now you can
publish a version
Versions can have aliases
VPC Support
Pricing
$0.20 per 1 million requests
Pay for CPU usages in 100ms
intervals. Price depends on
memory allocation.
From $0.000000208 to $0.000002501 per 100ms
First 1 million request
and
400,000 GB-seconds of
compute time per month
FREE!!!
This is equal to approx.:
888 hours at 128Mb
….
74 hours at 1.5Gb
Example uses
Image processing
Data processing
Scheduled Tasks
Document generation
If you need help email me
andrew.dixon@mso.net

More Related Content

PDF
AWS Lambda
PPTX
AWS - Lambda Fundamentals
PPTX
AWS Lambda
PPTX
Microsoft Azure Technical Overview
PPTX
AWS Cloud trail
PDF
Aws cloud watch
PPTX
AWS VPC & Networking basic concepts
PDF
AWS Connectivity, VPC Design and Security Pro Tips
AWS Lambda
AWS - Lambda Fundamentals
AWS Lambda
Microsoft Azure Technical Overview
AWS Cloud trail
Aws cloud watch
AWS VPC & Networking basic concepts
AWS Connectivity, VPC Design and Security Pro Tips

What's hot (20)

PPTX
What is AWS?
PDF
AWS
PPTX
Cloud Computing
PPTX
Azure fundamentals
PDF
Serverless computing with AWS Lambda
PPTX
Introduction To AWS & AWS Lambda
PPTX
Azure Introduction
PPTX
AWS Lambda Features and Uses
PDF
Microsoft Azure Fundamentals
PPTX
Azure Application Modernization
PDF
Azure DDoS Protection Standard
PDF
Cloud Native Application
PPTX
Kubernetes PPT.pptx
PPT
Intro to Amazon S3
PDF
AWS Serverless Introduction (Lambda)
PPTX
AWS solution Architect Associate study material
PPTX
Introduction to Docker - 2017
PDF
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
PDF
Getting Started with Infrastructure as Code
PPTX
Azure Security Overview
What is AWS?
AWS
Cloud Computing
Azure fundamentals
Serverless computing with AWS Lambda
Introduction To AWS & AWS Lambda
Azure Introduction
AWS Lambda Features and Uses
Microsoft Azure Fundamentals
Azure Application Modernization
Azure DDoS Protection Standard
Cloud Native Application
Kubernetes PPT.pptx
Intro to Amazon S3
AWS Serverless Introduction (Lambda)
AWS solution Architect Associate study material
Introduction to Docker - 2017
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Getting Started with Infrastructure as Code
Azure Security Overview
Ad

Viewers also liked (9)

PPTX
Smeta ru 9_v11
PPTX
Kirk williams: PPC Pricing Debate
PDF
DwightDavis_resume_122016
DOCX
TJ Dickey Resume.docx complete
DOCX
ISRO Summer Internship 2016 Project (3)
PDF
SIPP Pension & Investment Bond Fixed Return 9.85%
PPTX
11- MMA Forum Argentina 2016 - Una conversación abierta entre los líderes - C...
PDF
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
PPT
Is-sajf
Smeta ru 9_v11
Kirk williams: PPC Pricing Debate
DwightDavis_resume_122016
TJ Dickey Resume.docx complete
ISRO Summer Internship 2016 Project (3)
SIPP Pension & Investment Bond Fixed Return 9.85%
11- MMA Forum Argentina 2016 - Una conversación abierta entre los líderes - C...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
Is-sajf
Ad

Recently uploaded (20)

PDF
NewMind AI Monthly Chronicles - July 2025
PPT
Teaching material agriculture food technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
KodekX | Application Modernization Development
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Empathic Computing: Creating Shared Understanding
NewMind AI Monthly Chronicles - July 2025
Teaching material agriculture food technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Understanding_Digital_Forensics_Presentation.pptx
Spectral efficient network and resource selection model in 5G networks
The AUB Centre for AI in Media Proposal.docx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
KodekX | Application Modernization Development
Review of recent advances in non-invasive hemoglobin estimation
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Empathic Computing: Creating Shared Understanding

AWS Lambda

Editor's Notes

  • #2: Andrew Dixon Work for a digital agency call mso since 2000 Technical Director We are pivoting from a service agency to a product developer in the education sector Development platform of choice is Lucee but with new services like Lambda we are using these as well when they fit for our purposes
  • #3: Introduced by AWS in Oct 2014 Compute service that runs code in response to events
  • #4: Compute service and the interesting thing about it is what you don’t have to think about…
  • #5: You don’t have to think about infrastructure, which has interesting consequences
  • #6: Don’t worry about being under or over capacity, you can just give work to Lambda and it will do the compute for you. Same way as you give S3 your objects to store. Problems of having too many or too few servers don’t occur
  • #7: As your not worrying about the infrastructure, you don’t have to worry about how to get things onto the infrastructure No challenge of deploying code onto a fleet of servers, that’s Lambda’s problem
  • #8: Scaling is all done automatically, you just make a request for compute and Lambda gives it to you.
  • #9: Again, all taken care of automatically by Lambda, it is fully managed and under the hood it sorts everything out, like: Availability zones Spinning machines up and down Taking care of unhealthy hosts All the things that have nothing to do with your business value as such, but stand between you and deploying production apps at scale
  • #10: The boiler plate activities like logging come ready made out of the box.
  • #11: As well as OS and language updates…
  • #12: All taken care of for you, automatically, so there is nothing to manage.
  • #13: But it is not a straight jacket Very flexible
  • #14: For example, for Node you can bring a library like momentjs
  • #15: Because each Lambda call is a separate instance it automatically allows you to run code in parallel Massively and easily in parallel Tell Lambda what you want it to run and it figures out how to get the code started.
  • #17: Lambda is excellent for backends, mobile backends, web backends, IoT backends, etc…
  • #18: Lambda responds to your events
  • #19: If you have some data, somewhere, then you can use Lambda to recognise that data is there and get it to process it.
  • #20: Amazon talk about Lambda as being a “serverless” environment, which of course is a misnomer. But because of this one of the most interesting things is the economics of it Because you are not worrying about all the management there is a productive benefit to you because you don’t have to spend time and therefore money on it
  • #21: This means that you don’t have to worry about under or over provisioning to handle burst capacity The scale is driven automatically from the events
  • #22: Billed in fine grain 100ms units so as soon as your computation has finished you stop paying.
  • #23: And when you don’t have the infrastructure, you don’t have to worry about under-utilising the infrastructure so you never pay for idle.
  • #24: How all of this works is relatively simple Create your function, that does the required task
  • #25: Take your code, and native libraries, in the form of a zip file upload that to Lambda either directly or from S3. From that point, Lambda is ready to deploy and run your code.
  • #26: Node JS – version 0.10 and 4.3 Java – version 8 Python – version 2.7
  • #27: The code that you upload is stateless Persistent data is put elsewhere, e.g. S3, RDS, DynamoDB, etc…
  • #28: For monitoring and logging you have built-in support for CloudWatch metrics and logs
  • #29: Lambda integrates with lots of other AWS solutions including…
  • #30: All these and more… S3, DynamoDB, RDS, API Gateway and so on...
  • #33: Ranging from 128MB to 1.5GB from a pre-defined list in 64MB increments While the power levels are express as memory you should think about them as the percentage of the machine that you are requesting. At 128MB you are getting a small slice of the machine and at 1.5GB you are getting the full power of the machine.
  • #34: For CPU bound tasks allocate more memory for lower latency For example, choosing 256MB allocates approximately twice as much CPU power as requesting 128MB of memory and half as much as choosing 512MB.
  • #38: For compute intensive, set power level higher so that you pay more per 100ms but run for less time.
  • #39: For I/O intensive task, set power level lower as no point in paying for CPU.
  • #40: There are 7 “event sources” for Lambda and then there is API Gateway, which can invoke a Lambda function.
  • #41: You can call Lambda functions to power an API via the API gateway, meaning you can create “serverless” API’s API gateway allows you to create HTTP endpoints that invoke a Lambda function(s).
  • #42: Published versions are given and number and become immutable Aliases can map to versions to give the end user a stable ARN, e.g. prod, dev, etc…
  • #43: By using versioning nothing changes in how you use Lambda Upload code Make changes any time Last update wins when no version number is specified
  • #44: Publish a new version from development at any time These published versions receive a numbered version and become immutable Version numbers are a simple, integer counter starting at 1 Versions of a function are accessed using the ARN with a colon and the version number, e.g. :1, :2, etc..
  • #45: Versions can have aliases and aliases can move from one version to another e.g. you could have a prod and dev alias and today prod points at version 1 and dev at version 2 but tomorrow prod could be at version 2 and dev at version 3, etc… This means the client can have a stable ARN but have the ability to change what that ARN does. Aliases can be moved to any version at anytime, so you could use it to roll forwards and roll back.
  • #46: Lambda functions can access private resources, e.g. RDS, private EC2 endpoints, Elasticache, etc…
  • #49: Pay for CPU usage in 100 millisecond intervals, so if you use 565ms you pay for 600ms. Price depends on memory allocation.
  • #50: However first million request and 400,000 GB seconds are free, in perpetuity.
  • #51: So if you have a small system with a limited number of requests you could get away without paying for any Lambda time at all.
  • #52: We’ve been using Lambda for over a year now for various different things. Mainly to try and remove “heavy lifting” from Lucee so we can reduce the instance sizes we are using. This has allowed us to reduce are overall cost base for “compute”.
  • #53: Image processing is very CPU intensive. We have several clients that do a lot of image processing, both on user uploaded images and on images they are generating themselves. By shifting this to Lambda not only does it mean we can get maximum concurrency e.g. if 50 people all upload an image at the same time It can process all of them at the same time But the instance(s) the site is running on doesn’t have to be able to cope with this.
  • #54: Product used by schools - process large amounts of data from them every day. Originally this was all done in Lucee, but not sustainable. We would have to keep adding more and more instances to cope Moving it to Lambda has given us as much capacity as we will need, when we need it, without having to pay for it all the time. Not only can we run the data imports for all schools simultaneously, something we couldn’t really do effectively in Lucee, but schools can also run it “on-demand” without it being a concern to us.
  • #55: We always had an issue with multiple instances or with “auto-scaling” clusters with scheduled tasks and where to trigger them from. You would not want your tasks on all instances if you only want that task to be run once a hour or once a day on one server, e.g. to send an email, etc… We are now using Lambda to trigger tasks, written in Lucee, using a simple HTTP call from Lambda.
  • #56: Again, something else that can be “heavy lifting” like image processing, the generation of documents like PDFs, Word Documents, etc… can be CPU intensive. Lambda let us move that off the web server and be dealt with independatley, without us having to worry about a peak surge in demand, e.g. lots of parents all trying to download their childrens school report as a PDF at the same time.
  • #57: Essentially we used Lambda to remove the capacity headache while reducing our costs. Happy to help.