© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless with AWS Lambda
Farooq Alam
Cloud Computing Course
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
• Introduction to Serverless
• Why Serverless?
• What is AWS Lambda?
• AWS Lambda Use Cases
• Demo Time
• Q&A
Server-based architecture
involves managing and
maintaining your own servers,
while serverless architecture
utilizes cloud-based functions,
eliminating the need for server
management.
Server-based systems offer more
control and customization but
require ongoing maintenance and
infrastructure management.
Serverless architecture, on the
other hand, simplifies
development, reduces costs, and
enables rapid scalability, but may
offer less control.
Server based
3
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introduction to Serverless
Introduction to Serverless
The term “serverless” means that your code runs on servers, but you do not need to provision or manage
these servers. With serverless computing, you can focus more on innovating new products and features
instead of maintaining servers.
Another benefit of serverless computing is the flexibility to scale serverless applications automatically.
Serverless computing can adjust the applications' capacity by modifying the units of consumptions, such
as throughput and memory.
An AWS service for serverless computing is AWS Lambda.
5
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With Serverless
6
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With Serverless…
7
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why Serverless?
Why serverless? • No server management
Eliminate operational overhead so your teams can release quickly, get
feedback, and iterate to get to market faster.
• Automatic scaling
With technologies that automatically scale from zero to peak demands, you
can adapt to customer needs faster than ever.
• High availability built in
With technologies that automatically scale from zero to peak demands, you
can adapt to customer needs faster than ever.
• Pay for value billing model
With a pay-for-value billing model, resource utilization is automatically
optimized and you never pay for over-provisioning.
• Build better applications, easier
Serverless applications have built-in service integrations, so you can focus on
building your application instead of configuring it.
11
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS serverless services increase agility
Less code
to write
Reduced
maintenance
Built-in
Capabilities
Continuous
improvement
Customers can reduce their development time by 68% with AWS serverless*
Amazon Confidential 12
12
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“Serverless is the fastest way to build your ideas into applications
with lowest Time, Cost and Efforts”
Source: Deloitte 2019
41%
Increase in frequency to
deploy new features
23%
Increase in compute
utilization
39%
Reduction in IT
infrastructure spend
Known x AWS Survey of 505 U.S enterprises and 30 IT decision makers
Enterprises are achieving results at-scale on AWS Serverless
”
experience, which is why we’re
committed to a serverless solution on
AWS
- Michael Connor, chief architect for Coca-Cola
The new contactless Coca-Cola
Freestyle solution enables
consumers to choose and pour
drinks from their phones in just a
few seconds, without having to
create an account or download
an app.
Scaled the Web App from
Prototype to 10,000 Machines in
150 Days
Amazon
Lambda
Amazon
API
Gatewa
y
Going serverless accelerated our
engineering teams. The more we
experimented with a serverless mind-set,
the more we started to see a flywheel effect
where we could deliver value into the hands
of our business partners quickly
- Dave Anderson,
Director of technology at Liberty Mutual
Liberty Mutual Reduces Costs,
Improves Time to Market by Going
Serverless on AWS
Liberty Mutual has a serverless-first
policy, so engineers must first strive
to build serverless software or
functions.
Amazon
Lambda
AWS
Step
Functions
“
“ Low latency is essential to the user
”
”
https://aws.amazon.com/solutions/case-studies
“ The data is being collected to build data
services for customers that really drive
12
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
satisfaction and provide new capabilities
around safety and convenience
- Mahadevan Krishnan, principal architect of
Toyota Connected,
Amazon
Lambda
Amazon
Kinesis
Toyota uses customer vehicle
data for improving safety,
security and experience, with
privacy by design
Real time millions of data points
from connected vehicles globally
Startups scale up with Serverless
• Speed of
Innovation
• Scale at
ease
• Broadest set of
Data, Analytics
and AI/ML
services
13
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is AWS Lambda?
AWS Lambda
is a service that lets you run code without needing to provision or manage servers.
While using AWS Lambda, you pay only for the compute time that you consume. Charges apply only
when your code is running. You can also run code for virtually any type of application or backend
service, all with zero administration.
For example, a simple Lambda function might involve automatically resizing uploaded images to the AWS
Cloud. In this case, the function triggers when uploading a new image.
15
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda
16
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda Core Components
17
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Event Source Example
18
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda Use Cases
Sample Use Case 1: Real-Time File Processing
20
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sample Use Case 2: Stream Processing
21
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sample Use Case 3: Mobile and Web Applications
22
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda Limitation
AWS Lambda Limits
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Resource Quota
Function memory allocation 128 MB to 10,240 MB.
Function timeout 900 seconds (15 minutes)
Function environment variables 4 KB, for all environment variables associated
with the function, in aggregate
Function layers five layers
Function concurrency scaling limit For each function, 1,000 execution environments
every 10 seconds
Deployment package (.zip file archive) size
50 MB (zipped, for direct
upload) 250 MB (unzipped)
This quota applies to all the
files you upload, including
layers
and custom runtimes.
Demo Architecture
28
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank You

AWS Lambda for cloud computing lecture.pptx

  • 1.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serverless with AWS Lambda Farooq Alam Cloud Computing Course
  • 2.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Agenda • Introduction to Serverless • Why Serverless? • What is AWS Lambda? • AWS Lambda Use Cases • Demo Time • Q&A
  • 3.
    Server-based architecture involves managingand maintaining your own servers, while serverless architecture utilizes cloud-based functions, eliminating the need for server management. Server-based systems offer more control and customization but require ongoing maintenance and infrastructure management. Serverless architecture, on the other hand, simplifies development, reduces costs, and enables rapid scalability, but may offer less control. Server based 3 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 4.
  • 5.
    Introduction to Serverless Theterm “serverless” means that your code runs on servers, but you do not need to provision or manage these servers. With serverless computing, you can focus more on innovating new products and features instead of maintaining servers. Another benefit of serverless computing is the flexibility to scale serverless applications automatically. Serverless computing can adjust the applications' capacity by modifying the units of consumptions, such as throughput and memory. An AWS service for serverless computing is AWS Lambda. 5 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 6.
    With Serverless 6 © 2024,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 7.
    With Serverless… 7 © 2024,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 8.
  • 9.
    Why serverless? •No server management Eliminate operational overhead so your teams can release quickly, get feedback, and iterate to get to market faster. • Automatic scaling With technologies that automatically scale from zero to peak demands, you can adapt to customer needs faster than ever. • High availability built in With technologies that automatically scale from zero to peak demands, you can adapt to customer needs faster than ever. • Pay for value billing model With a pay-for-value billing model, resource utilization is automatically optimized and you never pay for over-provisioning. • Build better applications, easier Serverless applications have built-in service integrations, so you can focus on building your application instead of configuring it. 11 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 10.
    AWS serverless servicesincrease agility Less code to write Reduced maintenance Built-in Capabilities Continuous improvement Customers can reduce their development time by 68% with AWS serverless* Amazon Confidential 12 12 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 11.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. “Serverless is the fastest way to build your ideas into applications with lowest Time, Cost and Efforts” Source: Deloitte 2019 41% Increase in frequency to deploy new features 23% Increase in compute utilization 39% Reduction in IT infrastructure spend Known x AWS Survey of 505 U.S enterprises and 30 IT decision makers
  • 12.
    Enterprises are achievingresults at-scale on AWS Serverless ” experience, which is why we’re committed to a serverless solution on AWS - Michael Connor, chief architect for Coca-Cola The new contactless Coca-Cola Freestyle solution enables consumers to choose and pour drinks from their phones in just a few seconds, without having to create an account or download an app. Scaled the Web App from Prototype to 10,000 Machines in 150 Days Amazon Lambda Amazon API Gatewa y Going serverless accelerated our engineering teams. The more we experimented with a serverless mind-set, the more we started to see a flywheel effect where we could deliver value into the hands of our business partners quickly - Dave Anderson, Director of technology at Liberty Mutual Liberty Mutual Reduces Costs, Improves Time to Market by Going Serverless on AWS Liberty Mutual has a serverless-first policy, so engineers must first strive to build serverless software or functions. Amazon Lambda AWS Step Functions “ “ Low latency is essential to the user ” ” https://aws.amazon.com/solutions/case-studies “ The data is being collected to build data services for customers that really drive 12 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. satisfaction and provide new capabilities around safety and convenience - Mahadevan Krishnan, principal architect of Toyota Connected, Amazon Lambda Amazon Kinesis Toyota uses customer vehicle data for improving safety, security and experience, with privacy by design Real time millions of data points from connected vehicles globally
  • 13.
    Startups scale upwith Serverless • Speed of Innovation • Scale at ease • Broadest set of Data, Analytics and AI/ML services 13 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 14.
    What is AWSLambda?
  • 15.
    AWS Lambda is aservice that lets you run code without needing to provision or manage servers. While using AWS Lambda, you pay only for the compute time that you consume. Charges apply only when your code is running. You can also run code for virtually any type of application or backend service, all with zero administration. For example, a simple Lambda function might involve automatically resizing uploaded images to the AWS Cloud. In this case, the function triggers when uploading a new image. 15 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 16.
    AWS Lambda 16 © 2024,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 17.
    AWS Lambda CoreComponents 17 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 18.
    Event Source Example 18 ©2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 19.
  • 20.
    Sample Use Case1: Real-Time File Processing 20 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 21.
    Sample Use Case2: Stream Processing 21 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 22.
    Sample Use Case3: Mobile and Web Applications 22 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 23.
  • 24.
    AWS Lambda Limits ©2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Resource Quota Function memory allocation 128 MB to 10,240 MB. Function timeout 900 seconds (15 minutes) Function environment variables 4 KB, for all environment variables associated with the function, in aggregate Function layers five layers Function concurrency scaling limit For each function, 1,000 execution environments every 10 seconds Deployment package (.zip file archive) size 50 MB (zipped, for direct upload) 250 MB (unzipped) This quota applies to all the files you upload, including layers and custom runtimes.
  • 25.
    Demo Architecture 28 © 2024,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 26.