SlideShare una empresa de Scribd logo
1 de 77
Demystifying
Serverless on
AWS Riyadh User Group
Ahmed Samir
Solution Architect Associate
Technical Architect – Banking Sector
12 years experience in IT Field
Development Background in Microsoft stack
Organize Cloud Communities in Riyadh
/in/aseldesouky/ aseldesouky
AWSbelaraby
AWSbelaraby
#AWS_‫بالعربي‬
http://bit.ly/2vbnFH4
Agenda
• How we got to where we are?
• What's Serverless
• Serverless Principles
• Pros and cons
• Serverless architectures
• Lambda Anatomy
• Demos
• AWS SAM
• Demo
How we got to where we are?
Microservices SOA Monolithic
Design Services are built in small units
and expressed formally
with business-oriented APIs.
Services can range in size anywhere
from small application services to
very large enterprise services
including much more business
functionality.
Monolithic applications evolve into
huge size, a situation where
understanding the entirety of the
application is difficult.
Usability Services exposed with a standard
protocol, such as a RESTful
API, and consumed/reused by
other services and applications.
Services exposed with a standard
protocol, such as SOAP and
consumed/reused by other services
– leverage messaging middleware.
Limited re-use is realized across
monolithic applications.
Scalability Services exist as independent
deployment artifacts and can be
scaled independently of other
services.
Dependencies between services and
reusable sub-components can
introduce scaling challenges.
Scaling monolithic applications can
often be a challenge.
Agility Smaller independent deployable
units ease build/release
management, thereby high
operational agility.
Enhances components sharing that
increases dependencies and limits
management capabilities.
Difficult to achieve operational agility
in the repeated deployment of
monolithic application artifacts.
Development Developing services discretely
allows developers to use the
appropriate development
framework for the task at hand.
Reusable components and standard
practices helps developers with
implementation.
Monolithic applications are
implemented using a single
development stack (i.e., JEE or .NET),
which can limit the availability of
“the right tool for the job”.
XaaS
Infrastructure as a Service
(IaaS)
Software as a Service
(SaaS)
Platform as a Service
(PaaS)
Container as a Service
(CaaS)
Function as a Service
(FaaS)
base infrastructure (Virtual machine, Software Define Network, Storage attached)
AWS (EC2), Azure
VMmanaged by vendors: applications, runtime, data, middleware, OSes, virtualization,
servers, storage and networking, End users have to use it
Gmail, SAP,
SalesforceIt provides a platform allowing end user to develop, run, and manage applications
without the complexity of building and maintaining the infrastructure
AWS (Beanstalk)
container-based virtualization in which container engines, orchestration and the
underlying compute resources are delivered to users as a service from a cloud
providerAWS (ECS), Azure (ACS)
It provides a platform allowing customers to develop, run, and manage application
functionalities without the complexity of building and maintaining the infrastructure
AWS Lambda
Serverless
• Focus entirely on the business logic of your
applications.
• You don't have to think about servers, provisioned
infrastructure, networking, virtual machine etc.
• All this stuff is handled for you by a cloud provider
(AWS in case o Lambda).
• Usually it means, that your application heavily
relies on managed services (like Lambda,
DynamoDB, API Gateway) that are maintained by
a cloud provider and allow you to abstract the
server away
Serverless Principles
• Use a compute service to execute code on demand (no servers)
• Write single-purpose stateless functions
• Design push-based, event-driven pipelines
• Create thicker, more powerful front ends.
• Embrace third-party services
Serverless Principles
• Greater Agility
• Less Operations
• Faster time to market
• Cost growth with your business
• Simplifies packaging and deployment and
requires no system administration.
• Reduces the complexity of software.
• Fits with microservices, which can be
implemented as functions.
• Serverless is not efficient for long-running applications
• Vendor lock-in
• Serverless (and microservice) architectures introduce
additional overhead for function/microservice calls.
• To utilize its resources more efficiently, a service
provider may run software for several different
customers on the same physical server (this is also
known as “multitenancy”)
• In practice, it takes some time for a scalable serverless
platform to handle a first request by your function –
Cold Start
When to use
Serverless?
•No More Servers
•Startups that want to innovate and move quickly
•Low and expected cost
•Less Code
•Scalable And Flexible
Serverless Architectures
Compute as backend
an approach where a serverless compute service
such as Lambda and third-party services are used to
build a back end for web, mobile, and desktop
applications
The front-end can links directly to the database and an authentication
service. This is because there’s no need to put every service behind
an API Gateway if the front end can communicate with them in a
secure manner for example, using delegation tokens;
Compute as backend
Use Case
A Cloud Guru Architecture details
• The front end is built using AngularJS and is hosted by Netlify.
You could use S3 and CloudFront (CloudFront is a global content
delivery network provided by AWS) instead of Netlify if you
wanted to
• Auth0 is used to provide registration and authentication facilities.
It creates delegation tokens that allow the front end to directly
and securely communicate with other services such as Firebase.
• Firebase is the real-time database used by A Cloud Guru. Every
client creates a connection to Firebase using web sockets and
receives updates from it in near real time. This means that clients
receive updates as they happen without having to poll.
A Cloud Guru Architecture
details
• Lecturers who create content for the platform can upload files
(usually videos, but they could be other types) straight to S3
buckets via their browser. For this to work, the web application
invokes a Lambda function (via the API Gateway) to request the
necessary upload credentials first. As soon as credentials are
retrieved, the client web application begins a file upload to S3 via
HTTP. All of this happens behind the scenes and is opaque to the
user
A Cloud Guru Architecture
details
• Once a file is uploaded to S3, it automatically kicks off a chain of
events (event-driven pipeline) that transcodes the video, saves new
files in another bucket, updates the database, and immediately
makes transcoded videos available to other users. Throughout this
book you’ll write a similar system and see how it works in detail.
• To view videos, users are given permission by another Lambda
function. Permissions are valid for 24 hours, after which they must
be renewed. Files are accessed via CloudFront.
A Cloud Guru Architecture
details
• Users can submit questions and answers to the forums.
Questions, answers, and comments are recorded in the
database. This data is then sent for indexing to AWS CloudSearch,
which is a managed searching and indexing service from AWS.
This allows users to search and view questions, answers, and
comments that other people have written
Legacy API proxy
• Systems with outdated services and APIs can be difficult to
use in modern environments.
• They might not conform to modern protocols or standards,
which might make interoperability with current systems
harder.
• One way to alleviate this problem is to use the API Gateway
and Lambda in front of those legacy services.
• The API Gateway and Lambda functions can transform
requests made by clients and invoke legacy services directly
Legacy API proxy
Hybrid
• The hybrid approach may work especially well if a part of
the existing infrastructure is already in AWS.
• We’ve also seen adoption of serverless technologies and
architectures in organizations with developers initially
creating standalone components (often to do additional
data processing, database backups, and basic alerting) and
over time integrating these components into their main
systems
Hybrid
GraphQL
• Popular data query language developed by Facebook in
2012 and released publicly in 2015.
• It was designed as an alternative to REST (Representational
State Transfer) because of REST’s perceived weaknesses
(multiple round-trips, over-fetching, and problems with
versioning).
• GraphQL attempts to solve these problems by providing a
hierarchical, declarative way of performing queries from a
single end point
Legacy API proxy
Compute as glue
we can use Lambda functions to create powerful
execution pipelines and workflows.
This often involves using Lambda as glue between
different services, coordinating and invoking them.
With this style of architecture, the focus of the
developer is on the design of their pipeline,
coordination, and flow of data.
Compute as glue
Real-time processing
Amazon Kinesis Streams is a technology that can
help process and analyze large amounts of
streaming data. This data can include logs, events,
transactions, social media feeds—virtually anything
you can think of
It’s a good way to continuously collect data that may
change over time. Lambda is a perfect tool for
Kinesis Streams because it scales automatically in
response to how much data there is to process
Real-time processing
Serverless Architectures
1. Compute as back end
2. Compute as glue
3. Legacy API wrapper
4. Hybrid
5. GraphQL
6. Real-time processing
Lambda can be described as Function as a Service (FaaS), where the
functions is the main building block and execution unit. No servers to
manage, no virtual machines, clusters, containers, just a function created in
one of the supported languages
As with any other managed service, provisioning, scaling and reliability is
handled automatically by AWS. This allows us to work on a very high
abstraction level, focus entirely on the business logic and (almost) forget
about underlying resources.
Lambda Runtimes
Node.js 10
Node.js 12
Python 3.8
Python 3.7
Python 3.6
Python 2.7
Ruby 2.5
Java 8
Java 11
Go 1.x.NET Core 2.1
Lambda Event Sources
Synchronous vs Asynchronous
Event provides function with the detailed information about the event that has triggered the
execution (for example, Event from API Gateway can be used to retrieve request details such
as query parameters, header or even request body)
Context on the other hand, contains methods and properties that provide information about
the invocation, function, and execution environment (such as assigned memory limit or
upcoming execution timeout).
Quick Demo
Cold Start
1. Download your code
2. Set up a runtime environment, together with the resources
specified in the Lambda configuration
The exact length of the Cold Start
varies, depending on your code
package size and settings
For that reason it's wise to keep you
code package size as small as
possible
Take care of node_modules size
First Time o idle for a longer period of time
Warm Start
after handler execution. For some time, the
runtime remains active and can receive new
events
Warm execution is of course much faster than the cold one
we cannot assume that the function will, or will not be called with a cold or warm start
The time for which the function stays warm is not precisely defined in the documentation
and is actually based on your configuration and actual Lambda usage
If such event occurs, the warm runtime does
not have to be initialized again, it can execute
the handler immediately
If you allow concurrency of your Lambdas, newly created Lambda instances will also start
with a cold start.
Initialization vs handler
it's recommended, to store all the initialization code outside of the handler function. All the
initialization (like creating database connection), should be done outside of handler and
just used inside it.
ScalingAuto scaling of Lambda functions is handled automatically by Lambda service.
By default, Lambda is trying to handle
incoming invocation requests by
reusing the existing warm runtimes.
This works if the function execution
time is shorter then the time between
upcoming requests
if the time between the events is < the
function execution time, the single
function instance is not able to handle
those invocation requests.
ScalingAuto scaling of Lambda functions is handled automatically by Lambda service.
If Lambda receives a new invocation request while all the current runtimes are busy, it will create another
runtime. This new runtime will handle the upcoming invocation request and execute the function code.
Then runtime remains in the warm state for some time and can receive new requests. If the runtime stays
idle for a longer period of time, Lambda terminates it to free the resources.
AWS Lambda Limits
1000
Concurrent executions
Lambda invocation flow
The invocation request is passed by Load Balancer to a selected Frontend
Invoker, Frontend Invoker checks the request, and asks the Worker Manager for a
sandboxed function that will handle the invocation. Worker Manager either finds a
proper Worker and a sandbox, or creates one. Once it's ready, the code is executed
by a Worker
Isolation
The technology that powers this
flow is Firecracker. It's an open
source (link) project that allows
AWS to span hundreds and
thousands lightweight
sandboxes on a single Worker.
https://firecracker-microvm.github.io/
Workers can be reused across
multiple Lambdas and even
Accounts, which allows
the Placement Service to
organize the work to create and
apply the most performant usage
patterns as possible.
Pricing – By Region
Pricing – 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:
https://aws.amazon.com/lambda/pricing/
http://serverlesscalc.com/
Orchestrations
AWS Step Functions
AWS Step Functions
Demo
AWS Serverless Application Model
SAM
Demo
https://cicd.serverlessworkshops.io/
https://github.com/aws-samples/aws-serverless-airline-booking
Demistifying serverless on aws

Más contenido relacionado

La actualidad más candente

AWS in Media: Cloud and Serverless Architectures
AWS in Media: Cloud and Serverless ArchitecturesAWS in Media: Cloud and Serverless Architectures
AWS in Media: Cloud and Serverless ArchitecturesAmazon Web Services
 
AWS re:Invent 2016: What’s New with Amazon Redshift (BDA304)
AWS re:Invent 2016: What’s New with Amazon Redshift (BDA304)AWS re:Invent 2016: What’s New with Amazon Redshift (BDA304)
AWS re:Invent 2016: What’s New with Amazon Redshift (BDA304)Amazon Web Services
 
Closing Keynote - AWS Summit Stockholm
Closing Keynote - AWS Summit StockholmClosing Keynote - AWS Summit Stockholm
Closing Keynote - AWS Summit StockholmAmazon Web Services
 
Aws Architecture Fundamentals
Aws Architecture FundamentalsAws Architecture Fundamentals
Aws Architecture Fundamentals2nd Watch
 
Migrating Databases to AWS for Business Critical Applications and Analytics
Migrating Databases to AWS for Business Critical Applications and Analytics Migrating Databases to AWS for Business Critical Applications and Analytics
Migrating Databases to AWS for Business Critical Applications and Analytics Amazon Web Services
 
AWS Services for Content Production
AWS Services for Content ProductionAWS Services for Content Production
AWS Services for Content ProductionAmazon Web Services
 
Getting Started with Managed Services | AWS Public Sector Summit 2016
Getting Started with Managed Services | AWS Public Sector Summit 2016Getting Started with Managed Services | AWS Public Sector Summit 2016
Getting Started with Managed Services | AWS Public Sector Summit 2016Amazon Web Services
 
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioni
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioniContent Delivery: accelerare in modo sicuro e flessibile siti web e applicazioni
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioniAmazon Web Services
 
Automate Best Practices and Operational Health for your AWS Resources
Automate Best Practices and Operational Health for your AWS ResourcesAutomate Best Practices and Operational Health for your AWS Resources
Automate Best Practices and Operational Health for your AWS ResourcesAmazon Web Services
 
Microservizi e container Docker in produzione: strumenti e consigli
Microservizi e container Docker in produzione: strumenti e consigliMicroservizi e container Docker in produzione: strumenti e consigli
Microservizi e container Docker in produzione: strumenti e consigliAmazon Web Services
 
Born in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a StartupBorn in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a StartupAmazon Web Services
 
Lesson 1 in Cloud – Read Instructions Carefully - session sponsored by Vocus
Lesson 1 in Cloud – Read Instructions Carefully - session sponsored by VocusLesson 1 in Cloud – Read Instructions Carefully - session sponsored by Vocus
Lesson 1 in Cloud – Read Instructions Carefully - session sponsored by VocusAmazon Web Services
 
Hong Kong AWS Summit 2017 - Keynote
Hong Kong AWS Summit 2017 - KeynoteHong Kong AWS Summit 2017 - Keynote
Hong Kong AWS Summit 2017 - KeynoteAmazon Web Services
 
Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows Amazon Web Services
 
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)Amazon Web Services
 
Ponencia Principal - AWS Summit - Madrid
Ponencia Principal - AWS Summit - MadridPonencia Principal - AWS Summit - Madrid
Ponencia Principal - AWS Summit - MadridAmazon Web Services
 
AWS Security Best Practices and Design Patterns
AWS Security Best Practices and Design PatternsAWS Security Best Practices and Design Patterns
AWS Security Best Practices and Design PatternsAmazon Web Services
 
Getting Started With Amazon Quick Sight
Getting Started With Amazon Quick SightGetting Started With Amazon Quick Sight
Getting Started With Amazon Quick SightAmazon Web Services
 

La actualidad más candente (20)

AWS in Media: Cloud and Serverless Architectures
AWS in Media: Cloud and Serverless ArchitecturesAWS in Media: Cloud and Serverless Architectures
AWS in Media: Cloud and Serverless Architectures
 
AWS re:Invent 2016: What’s New with Amazon Redshift (BDA304)
AWS re:Invent 2016: What’s New with Amazon Redshift (BDA304)AWS re:Invent 2016: What’s New with Amazon Redshift (BDA304)
AWS re:Invent 2016: What’s New with Amazon Redshift (BDA304)
 
Closing Keynote - AWS Summit Stockholm
Closing Keynote - AWS Summit StockholmClosing Keynote - AWS Summit Stockholm
Closing Keynote - AWS Summit Stockholm
 
Databases on AWS Workshop.pdf
Databases on AWS Workshop.pdfDatabases on AWS Workshop.pdf
Databases on AWS Workshop.pdf
 
Aws Architecture Fundamentals
Aws Architecture FundamentalsAws Architecture Fundamentals
Aws Architecture Fundamentals
 
Migrating Databases to AWS for Business Critical Applications and Analytics
Migrating Databases to AWS for Business Critical Applications and Analytics Migrating Databases to AWS for Business Critical Applications and Analytics
Migrating Databases to AWS for Business Critical Applications and Analytics
 
AWS Services for Content Production
AWS Services for Content ProductionAWS Services for Content Production
AWS Services for Content Production
 
Getting Started with Managed Services | AWS Public Sector Summit 2016
Getting Started with Managed Services | AWS Public Sector Summit 2016Getting Started with Managed Services | AWS Public Sector Summit 2016
Getting Started with Managed Services | AWS Public Sector Summit 2016
 
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioni
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioniContent Delivery: accelerare in modo sicuro e flessibile siti web e applicazioni
Content Delivery: accelerare in modo sicuro e flessibile siti web e applicazioni
 
Automate Best Practices and Operational Health for your AWS Resources
Automate Best Practices and Operational Health for your AWS ResourcesAutomate Best Practices and Operational Health for your AWS Resources
Automate Best Practices and Operational Health for your AWS Resources
 
Microservizi e container Docker in produzione: strumenti e consigli
Microservizi e container Docker in produzione: strumenti e consigliMicroservizi e container Docker in produzione: strumenti e consigli
Microservizi e container Docker in produzione: strumenti e consigli
 
Born in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a StartupBorn in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a Startup
 
Protecting Your Data in AWS
Protecting Your Data in AWSProtecting Your Data in AWS
Protecting Your Data in AWS
 
Lesson 1 in Cloud – Read Instructions Carefully - session sponsored by Vocus
Lesson 1 in Cloud – Read Instructions Carefully - session sponsored by VocusLesson 1 in Cloud – Read Instructions Carefully - session sponsored by Vocus
Lesson 1 in Cloud – Read Instructions Carefully - session sponsored by Vocus
 
Hong Kong AWS Summit 2017 - Keynote
Hong Kong AWS Summit 2017 - KeynoteHong Kong AWS Summit 2017 - Keynote
Hong Kong AWS Summit 2017 - Keynote
 
Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows
 
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
 
Ponencia Principal - AWS Summit - Madrid
Ponencia Principal - AWS Summit - MadridPonencia Principal - AWS Summit - Madrid
Ponencia Principal - AWS Summit - Madrid
 
AWS Security Best Practices and Design Patterns
AWS Security Best Practices and Design PatternsAWS Security Best Practices and Design Patterns
AWS Security Best Practices and Design Patterns
 
Getting Started With Amazon Quick Sight
Getting Started With Amazon Quick SightGetting Started With Amazon Quick Sight
Getting Started With Amazon Quick Sight
 

Similar a Demistifying serverless on aws

Fox pong mvp architectual overview
Fox pong mvp architectual overviewFox pong mvp architectual overview
Fox pong mvp architectual overviewdaviddaedalus
 
Introduction to Azure fundamentals of cloud.pptx
Introduction to Azure fundamentals of cloud.pptxIntroduction to Azure fundamentals of cloud.pptx
Introduction to Azure fundamentals of cloud.pptxNadir Arain
 
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...RapidValue
 
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)Amazon Web Services
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdfSGBSeo
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdfseo18
 
Aws serverless multi-tier_architectures
Aws serverless multi-tier_architecturesAws serverless multi-tier_architectures
Aws serverless multi-tier_architecturessonpro2312
 
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...Srini Karlekar
 
CLOUD COMPUTING.pptx
CLOUD COMPUTING.pptxCLOUD COMPUTING.pptx
CLOUD COMPUTING.pptxSurajThapa79
 
Building Serverless Microservices Using Serverless Framework on the Cloud
Building Serverless Microservices Using Serverless Framework on the CloudBuilding Serverless Microservices Using Serverless Framework on the Cloud
Building Serverless Microservices Using Serverless Framework on the CloudSrini Karlekar
 
Cloud description
Cloud descriptionCloud description
Cloud descriptionthanuambika
 
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds MeetupIntroducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds MeetupBoaz Ziniman
 
Third party cloud services cloud computing
Third party cloud services cloud computingThird party cloud services cloud computing
Third party cloud services cloud computingSohailAliMalik
 
Serverless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment OpportunitiesServerless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment OpportunitiesUnderscore VC
 
How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018Amazon Web Services
 
Technology Overview
Technology OverviewTechnology Overview
Technology OverviewLiran Zelkha
 
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL MeetupMicroservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL MeetupBoaz Ziniman
 
Aws re invent 2018 recap
Aws re invent 2018 recapAws re invent 2018 recap
Aws re invent 2018 recapCloudHesive
 

Similar a Demistifying serverless on aws (20)

Fox pong mvp architectual overview
Fox pong mvp architectual overviewFox pong mvp architectual overview
Fox pong mvp architectual overview
 
Introduction to Azure fundamentals of cloud.pptx
Introduction to Azure fundamentals of cloud.pptxIntroduction to Azure fundamentals of cloud.pptx
Introduction to Azure fundamentals of cloud.pptx
 
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
 
Serverless Architectures
Serverless Architectures Serverless Architectures
Serverless Architectures
 
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
 
Aws serverless multi-tier_architectures
Aws serverless multi-tier_architecturesAws serverless multi-tier_architectures
Aws serverless multi-tier_architectures
 
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
 
CLOUD COMPUTING.pptx
CLOUD COMPUTING.pptxCLOUD COMPUTING.pptx
CLOUD COMPUTING.pptx
 
Building Serverless Microservices Using Serverless Framework on the Cloud
Building Serverless Microservices Using Serverless Framework on the CloudBuilding Serverless Microservices Using Serverless Framework on the Cloud
Building Serverless Microservices Using Serverless Framework on the Cloud
 
Cloud description
Cloud descriptionCloud description
Cloud description
 
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds MeetupIntroducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
 
Third party cloud services cloud computing
Third party cloud services cloud computingThird party cloud services cloud computing
Third party cloud services cloud computing
 
Serverless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment OpportunitiesServerless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment Opportunities
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL MeetupMicroservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL Meetup
 
Aws re invent 2018 recap
Aws re invent 2018 recapAws re invent 2018 recap
Aws re invent 2018 recap
 

Más de AWS Riyadh User Group

Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...AWS Riyadh User Group
 
Amazon SageMaker Build, Train and Deploy Your ML Models
Amazon SageMaker Build, Train and Deploy Your ML ModelsAmazon SageMaker Build, Train and Deploy Your ML Models
Amazon SageMaker Build, Train and Deploy Your ML ModelsAWS Riyadh User Group
 
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on aws
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on awsAWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on aws
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on awsAWS Riyadh User Group
 
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in aws
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in awsAWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in aws
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in awsAWS Riyadh User Group
 
AWS Technical Day Riyadh Nov 2019 [Migration]
AWS Technical Day Riyadh Nov 2019 [Migration]AWS Technical Day Riyadh Nov 2019 [Migration]
AWS Technical Day Riyadh Nov 2019 [Migration]AWS Riyadh User Group
 
Amazon Virtual Private Cloud - VPC 2
Amazon Virtual Private Cloud - VPC 2Amazon Virtual Private Cloud - VPC 2
Amazon Virtual Private Cloud - VPC 2AWS Riyadh User Group
 
Amazon Virtual Private Cloud - VPC 1
Amazon Virtual Private Cloud - VPC 1Amazon Virtual Private Cloud - VPC 1
Amazon Virtual Private Cloud - VPC 1AWS Riyadh User Group
 
Amazon relational database service (rds)
Amazon relational database service (rds)Amazon relational database service (rds)
Amazon relational database service (rds)AWS Riyadh User Group
 

Más de AWS Riyadh User Group (17)

Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
 
Amazon SageMaker Build, Train and Deploy Your ML Models
Amazon SageMaker Build, Train and Deploy Your ML ModelsAmazon SageMaker Build, Train and Deploy Your ML Models
Amazon SageMaker Build, Train and Deploy Your ML Models
 
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on aws
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on awsAWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on aws
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on aws
 
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in aws
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in awsAWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in aws
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in aws
 
AWS Technical Day Riyadh Nov 2019 [Migration]
AWS Technical Day Riyadh Nov 2019 [Migration]AWS Technical Day Riyadh Nov 2019 [Migration]
AWS Technical Day Riyadh Nov 2019 [Migration]
 
AWS Amplify
AWS AmplifyAWS Amplify
AWS Amplify
 
EC2 and S3 Level 100
EC2 and S3 Level 100EC2 and S3 Level 100
EC2 and S3 Level 100
 
Devops on AWS
Devops on AWSDevops on AWS
Devops on AWS
 
Blockchain on AWS
Blockchain on AWSBlockchain on AWS
Blockchain on AWS
 
AWS AI Services
AWS AI ServicesAWS AI Services
AWS AI Services
 
AWS Cloudformation Session 01
AWS Cloudformation Session 01AWS Cloudformation Session 01
AWS Cloudformation Session 01
 
AWS Cloud Security
AWS Cloud SecurityAWS Cloud Security
AWS Cloud Security
 
AWS Messaging
AWS MessagingAWS Messaging
AWS Messaging
 
Amazon Virtual Private Cloud - VPC 2
Amazon Virtual Private Cloud - VPC 2Amazon Virtual Private Cloud - VPC 2
Amazon Virtual Private Cloud - VPC 2
 
Amazon Virtual Private Cloud - VPC 1
Amazon Virtual Private Cloud - VPC 1Amazon Virtual Private Cloud - VPC 1
Amazon Virtual Private Cloud - VPC 1
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Amazon relational database service (rds)
Amazon relational database service (rds)Amazon relational database service (rds)
Amazon relational database service (rds)
 

Último

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Último (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Demistifying serverless on aws

  • 2. Ahmed Samir Solution Architect Associate Technical Architect – Banking Sector 12 years experience in IT Field Development Background in Microsoft stack Organize Cloud Communities in Riyadh /in/aseldesouky/ aseldesouky AWSbelaraby AWSbelaraby #AWS_‫بالعربي‬ http://bit.ly/2vbnFH4
  • 3. Agenda • How we got to where we are? • What's Serverless • Serverless Principles • Pros and cons • Serverless architectures • Lambda Anatomy • Demos • AWS SAM • Demo
  • 4. How we got to where we are?
  • 5. Microservices SOA Monolithic Design Services are built in small units and expressed formally with business-oriented APIs. Services can range in size anywhere from small application services to very large enterprise services including much more business functionality. Monolithic applications evolve into huge size, a situation where understanding the entirety of the application is difficult. Usability Services exposed with a standard protocol, such as a RESTful API, and consumed/reused by other services and applications. Services exposed with a standard protocol, such as SOAP and consumed/reused by other services – leverage messaging middleware. Limited re-use is realized across monolithic applications. Scalability Services exist as independent deployment artifacts and can be scaled independently of other services. Dependencies between services and reusable sub-components can introduce scaling challenges. Scaling monolithic applications can often be a challenge. Agility Smaller independent deployable units ease build/release management, thereby high operational agility. Enhances components sharing that increases dependencies and limits management capabilities. Difficult to achieve operational agility in the repeated deployment of monolithic application artifacts. Development Developing services discretely allows developers to use the appropriate development framework for the task at hand. Reusable components and standard practices helps developers with implementation. Monolithic applications are implemented using a single development stack (i.e., JEE or .NET), which can limit the availability of “the right tool for the job”.
  • 6. XaaS Infrastructure as a Service (IaaS) Software as a Service (SaaS) Platform as a Service (PaaS) Container as a Service (CaaS) Function as a Service (FaaS) base infrastructure (Virtual machine, Software Define Network, Storage attached) AWS (EC2), Azure VMmanaged by vendors: applications, runtime, data, middleware, OSes, virtualization, servers, storage and networking, End users have to use it Gmail, SAP, SalesforceIt provides a platform allowing end user to develop, run, and manage applications without the complexity of building and maintaining the infrastructure AWS (Beanstalk) container-based virtualization in which container engines, orchestration and the underlying compute resources are delivered to users as a service from a cloud providerAWS (ECS), Azure (ACS) It provides a platform allowing customers to develop, run, and manage application functionalities without the complexity of building and maintaining the infrastructure AWS Lambda
  • 7.
  • 8. Serverless • Focus entirely on the business logic of your applications. • You don't have to think about servers, provisioned infrastructure, networking, virtual machine etc. • All this stuff is handled for you by a cloud provider (AWS in case o Lambda). • Usually it means, that your application heavily relies on managed services (like Lambda, DynamoDB, API Gateway) that are maintained by a cloud provider and allow you to abstract the server away
  • 10. • Use a compute service to execute code on demand (no servers) • Write single-purpose stateless functions • Design push-based, event-driven pipelines • Create thicker, more powerful front ends. • Embrace third-party services Serverless Principles
  • 11.
  • 12. • Greater Agility • Less Operations • Faster time to market • Cost growth with your business • Simplifies packaging and deployment and requires no system administration. • Reduces the complexity of software. • Fits with microservices, which can be implemented as functions.
  • 13. • Serverless is not efficient for long-running applications • Vendor lock-in • Serverless (and microservice) architectures introduce additional overhead for function/microservice calls. • To utilize its resources more efficiently, a service provider may run software for several different customers on the same physical server (this is also known as “multitenancy”) • In practice, it takes some time for a scalable serverless platform to handle a first request by your function – Cold Start
  • 15. •No More Servers •Startups that want to innovate and move quickly •Low and expected cost •Less Code •Scalable And Flexible
  • 17. Compute as backend an approach where a serverless compute service such as Lambda and third-party services are used to build a back end for web, mobile, and desktop applications The front-end can links directly to the database and an authentication service. This is because there’s no need to put every service behind an API Gateway if the front end can communicate with them in a secure manner for example, using delegation tokens;
  • 20.
  • 21. A Cloud Guru Architecture details • The front end is built using AngularJS and is hosted by Netlify. You could use S3 and CloudFront (CloudFront is a global content delivery network provided by AWS) instead of Netlify if you wanted to • Auth0 is used to provide registration and authentication facilities. It creates delegation tokens that allow the front end to directly and securely communicate with other services such as Firebase. • Firebase is the real-time database used by A Cloud Guru. Every client creates a connection to Firebase using web sockets and receives updates from it in near real time. This means that clients receive updates as they happen without having to poll.
  • 22. A Cloud Guru Architecture details • Lecturers who create content for the platform can upload files (usually videos, but they could be other types) straight to S3 buckets via their browser. For this to work, the web application invokes a Lambda function (via the API Gateway) to request the necessary upload credentials first. As soon as credentials are retrieved, the client web application begins a file upload to S3 via HTTP. All of this happens behind the scenes and is opaque to the user
  • 23. A Cloud Guru Architecture details • Once a file is uploaded to S3, it automatically kicks off a chain of events (event-driven pipeline) that transcodes the video, saves new files in another bucket, updates the database, and immediately makes transcoded videos available to other users. Throughout this book you’ll write a similar system and see how it works in detail. • To view videos, users are given permission by another Lambda function. Permissions are valid for 24 hours, after which they must be renewed. Files are accessed via CloudFront.
  • 24. A Cloud Guru Architecture details • Users can submit questions and answers to the forums. Questions, answers, and comments are recorded in the database. This data is then sent for indexing to AWS CloudSearch, which is a managed searching and indexing service from AWS. This allows users to search and view questions, answers, and comments that other people have written
  • 25. Legacy API proxy • Systems with outdated services and APIs can be difficult to use in modern environments. • They might not conform to modern protocols or standards, which might make interoperability with current systems harder. • One way to alleviate this problem is to use the API Gateway and Lambda in front of those legacy services. • The API Gateway and Lambda functions can transform requests made by clients and invoke legacy services directly
  • 27. Hybrid • The hybrid approach may work especially well if a part of the existing infrastructure is already in AWS. • We’ve also seen adoption of serverless technologies and architectures in organizations with developers initially creating standalone components (often to do additional data processing, database backups, and basic alerting) and over time integrating these components into their main systems
  • 29. GraphQL • Popular data query language developed by Facebook in 2012 and released publicly in 2015. • It was designed as an alternative to REST (Representational State Transfer) because of REST’s perceived weaknesses (multiple round-trips, over-fetching, and problems with versioning). • GraphQL attempts to solve these problems by providing a hierarchical, declarative way of performing queries from a single end point
  • 31. Compute as glue we can use Lambda functions to create powerful execution pipelines and workflows. This often involves using Lambda as glue between different services, coordinating and invoking them. With this style of architecture, the focus of the developer is on the design of their pipeline, coordination, and flow of data.
  • 33. Real-time processing Amazon Kinesis Streams is a technology that can help process and analyze large amounts of streaming data. This data can include logs, events, transactions, social media feeds—virtually anything you can think of It’s a good way to continuously collect data that may change over time. Lambda is a perfect tool for Kinesis Streams because it scales automatically in response to how much data there is to process
  • 35. Serverless Architectures 1. Compute as back end 2. Compute as glue 3. Legacy API wrapper 4. Hybrid 5. GraphQL 6. Real-time processing
  • 36.
  • 37. Lambda can be described as Function as a Service (FaaS), where the functions is the main building block and execution unit. No servers to manage, no virtual machines, clusters, containers, just a function created in one of the supported languages As with any other managed service, provisioning, scaling and reliability is handled automatically by AWS. This allows us to work on a very high abstraction level, focus entirely on the business logic and (almost) forget about underlying resources.
  • 38. Lambda Runtimes Node.js 10 Node.js 12 Python 3.8 Python 3.7 Python 3.6 Python 2.7 Ruby 2.5 Java 8 Java 11 Go 1.x.NET Core 2.1
  • 41. Event provides function with the detailed information about the event that has triggered the execution (for example, Event from API Gateway can be used to retrieve request details such as query parameters, header or even request body) Context on the other hand, contains methods and properties that provide information about the invocation, function, and execution environment (such as assigned memory limit or upcoming execution timeout).
  • 43. Cold Start 1. Download your code 2. Set up a runtime environment, together with the resources specified in the Lambda configuration The exact length of the Cold Start varies, depending on your code package size and settings For that reason it's wise to keep you code package size as small as possible Take care of node_modules size First Time o idle for a longer period of time
  • 44. Warm Start after handler execution. For some time, the runtime remains active and can receive new events Warm execution is of course much faster than the cold one we cannot assume that the function will, or will not be called with a cold or warm start The time for which the function stays warm is not precisely defined in the documentation and is actually based on your configuration and actual Lambda usage If such event occurs, the warm runtime does not have to be initialized again, it can execute the handler immediately If you allow concurrency of your Lambdas, newly created Lambda instances will also start with a cold start.
  • 45. Initialization vs handler it's recommended, to store all the initialization code outside of the handler function. All the initialization (like creating database connection), should be done outside of handler and just used inside it.
  • 46. ScalingAuto scaling of Lambda functions is handled automatically by Lambda service. By default, Lambda is trying to handle incoming invocation requests by reusing the existing warm runtimes. This works if the function execution time is shorter then the time between upcoming requests if the time between the events is < the function execution time, the single function instance is not able to handle those invocation requests.
  • 47. ScalingAuto scaling of Lambda functions is handled automatically by Lambda service. If Lambda receives a new invocation request while all the current runtimes are busy, it will create another runtime. This new runtime will handle the upcoming invocation request and execute the function code. Then runtime remains in the warm state for some time and can receive new requests. If the runtime stays idle for a longer period of time, Lambda terminates it to free the resources.
  • 49. Lambda invocation flow The invocation request is passed by Load Balancer to a selected Frontend Invoker, Frontend Invoker checks the request, and asks the Worker Manager for a sandboxed function that will handle the invocation. Worker Manager either finds a proper Worker and a sandbox, or creates one. Once it's ready, the code is executed by a Worker
  • 50. Isolation The technology that powers this flow is Firecracker. It's an open source (link) project that allows AWS to span hundreds and thousands lightweight sandboxes on a single Worker. https://firecracker-microvm.github.io/ Workers can be reused across multiple Lambdas and even Accounts, which allows the Placement Service to organize the work to create and apply the most performant usage patterns as possible.
  • 51. Pricing – By Region
  • 52. Pricing – 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: https://aws.amazon.com/lambda/pricing/ http://serverlesscalc.com/
  • 55. Demo
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75. Demo