SlideShare a Scribd company logo
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Building a web application without servers
Raymond Lai
Solutions Architect
raymlai@amazon.com
Running servers makes me sad
Photo by Justin Veenema
<start>
It’s easier than ever to build web applications that are:
• Massively scalable
• Highly available and fault-tolerant
• Easily secured
• Cost-aligned with usage
Without:
• Managing a single server or container orchestration system
• Patching operating systems
• Monitoring operating system metrics to control scaling
How?
With serverless
No infrastructure provisioning,
no management
Automatic scaling
Pay for value Highly available and secure
Exploring a basic web application technology stack
InternetMobile/
Web apps
?Frontend
?Backend
?Database
Exploring a basic web application technology stack
InternetMobile/
Web apps
?Backend
?Database
?Frontend
Frontend servers
• Serve mostly static contents
• HTML
• CSS
• JavaScript
• Image, video, etc.
• Might generate dynamic contents with
languages like PHP
• Reactive Web Framework
• Non-blocking and event-driven
applications
• Using declarative approach
• With interface library and data request
capabilities
• Easier to support multiple platforms
PastPresent
Two options for serverless hosting of static content
Roll your own with Amazon Simple
Storage Service (Amazon S3)
Amazon S3
AWS Amplify CLI &
Amplify Console
AWS Amplify
Amazon S3
Amazon S3
• Can host static websites
• Supports fine-grained
permission control
• Acts as a logging endpoint for
Web services
• Supports encryption at transit and
at rest
• Lifecycle capabilities to rotate data
across tiers and even delete them
if needed
Amazon CloudFront
• Cache static content at the edge
for faster delivery
• Dynamic and static content
• Custom SSL certificates
• Low TTLs (as short as 0 seconds)
Responsetime
Serverload
Response
time
Server
load
Response
time
Server
load
No CDN CDN for
static content
CDN for static
and dynamic
content
AWS Amplify
makes it easy to create, configure, and implement
scalable mobile and web apps powered by AWS
• Framework
• Cloudservices
• Developertools
• Continuousdeployment
• Hosting
AWS Amplify
Step 1:
“amplify init”
AWS Amplify
Step 2:
“amplify add hosting”
& define repository
AWS Amplify
Hosting for static web applications
• Integrated with Git
• Built-in CI/CD workflows (supports Git branches)
• Host a friendly URL with CDN
• Support for auth controls
• Built-in rewrites and redirects of URL
• Deploy SPA with popular frontend frameworks such as Vue, Angular,
and React
AWS Amplify
InternetMobile/Web
apps
Exploring a basic web application technology stack
?Backend
?DatabaseAWS Amplify
AWS Amplify
Exploring a basic web application technology stack
?InternetMobile/Web
apps
?Database
?Backend
APIs are the
front door
of modern
applications
To put it simply: Amazon API Gateway
makes it easy to host serverless APIs
Amazon API Gateway: Types of APIs
Amazon API Gateway
API Gateway
cache
Amazon
CloudWatch
monitoring
Fully managed
CloudFront
distribution
Edge-optimizedRegionalPrivate
Edge-optimized
• Utilizes CloudFront to
reduce TLS connection
overhead (reduces
roundtrip time)
• Designed for a globally
distributed set of clients
Regional
• Recommended API
type for general
use cases
• Designed for building
APIs for clients in the
same region
Private
• Only accessible
from within VPC
(and networks
connected to VPC)
• Designed for building
APIs used internally
or by private
microservices
AWS Lambda
functions
Any other
AWS service
Secure with your Amazon API Gateway
Several mechanisms for adding authorization/authentication
and restricting API access
• IAM permissions – use IAM policies and AWS credentials to
grant access
• Lambda authorizers – use Lambda to validate a bearer token
(e.g., OAuth or SAML) or request parameters and grant access
• Amazon Cognito user pools – create a completely managed
user management system
• Resource policies – can restrict based on IP, VPC, and AWS Account ID
AWS Amplify
InternetMobile/Web
apps
Exploring a basic web application technology stack
?DatabaseAmazon API
Gateway
?
Event-driven compute
Functions as a service
Serverless FaaS
AWS Lambda
Serverless applications
Services (anything)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Event source Function
Node.js
Python
Java
C#
Go
Ruby
Runtime API
Serverless applications
Services (anything)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Event source Function
Node.js
Python
Java
C#
Go
Ruby
Runtime API
Serverless applications
Services (anything)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Event source Function
Node.js
Python
Java
C#
Go
Ruby
Runtime API
Lambda execution model
Synchronous
(push)
Asynchronous
(event)
Stream
(poll-based)
/order
Amazon API
Gateway
Lambda
function
Amazon
DynamoDB
Amazon
Kinesis
changes
AWS Lambda
service
Lambda
function
Amazon
SNS
Amazon
S3
reqs
Lambda
function
Smart resource allocation
Stats for Lambda function that calculates 1000 times all prime numbers
<= 1000000
128 MB 11.722965 sec $0.024628
256 MB 6.678945 sec $0.028035
512 MB 3.194954 sec $0.026830
1024 MB 1.465984 sec $0.024638
Best
Worst
Lambda exposes only a memory control, with the % of CPU core and network
capacity allocated to a function proportionally
Match resource allocation (up to 3 GB) to logic
Lambda permissions model
Function policies
• “Actions on bucket X can
invoke Lambda function Z"
• Resource policies allow
for cross-account access
• Used for sync and
async invocations
Execution role
• “Lambda function A can read from
DynamoDB table users”
• Define what AWS resources / API
calls this function can access
via IAM
• Used in streaming invocations
Event source ServicesFunction
AWS Amplify
InternetMobile/Web
apps
Exploring a basic web application technology stack
?DatabaseAmazon API
Gateway
AWS Lambda
Mobile/Web
apps
Internet
AWS Amplify
Exploring a basic web application technology stack
Amazon API
Gateway
AWS Lambda
?Database
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Common data categories
Relational Key value Document In memory Graph Time series Ledger
Aurora, RDS DynamoDB Amazon
DocumentDB
ElastiCache Neptune Timestream QLDBAWS
Service(s)
Amazon DynamoDB
Fast and flexible NoSQL database service for any scale
Enterprise-ready
ACID transactions
Encryption at rest
On-demand backup and restore
Performance at scale
Handles millions of requests
per second
Delivers microsecond latency
Automated global replication
Serverless
Maintenance-free
Auto scaling
On-demand capacity mode
Why we choose DynamoDB?
All Amazon database services have:
• Easy scale controls + ability to handle massive scale
• High availability and durability
• Backup/restore capabilities
• Billing options that can scale with your business need
But in sticking with the theme of serverless, DynamoDB wins out:
• Pay-for-what-you-use billing
• Dynamic scaling without the need to preconfigure capacity
Again, most of this will depend on what your use case is
AWS Amplify
Exploring a basic web application technology stack
Amazon API
Gateway
AWS Lambda
Amazon
DynamoDB
Mobile/Web
apps
Internet
</end>
By combining these services, we can build a completely serverless
application stack
• No servers to manage
• Automatic scalability to handle most workloads
• High availability and fault tolerance out of the box
• Numerous security controls throughout the stack
• Aligned costs to consumption
Thank you!
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Raymond Lai
raymlai@amazon.com

More Related Content

What's hot

Amazon Macie Demo
Amazon Macie DemoAmazon Macie Demo
Amazon Macie Demo
Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services
 
AWS solution Architect Associate study material
AWS solution Architect Associate study materialAWS solution Architect Associate study material
AWS solution Architect Associate study material
Nagesh Ramamoorthy
 
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Amazon Web Services
 
Getting Started with AWS Database Migration Service
Getting Started with AWS Database Migration ServiceGetting Started with AWS Database Migration Service
Getting Started with AWS Database Migration Service
Amazon Web Services
 
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
Simplilearn
 
AWS 101
AWS 101AWS 101
Using AWS Control Tower to govern multi-account AWS environments at scale - G...
Using AWS Control Tower to govern multi-account AWS environments at scale - G...Using AWS Control Tower to govern multi-account AWS environments at scale - G...
Using AWS Control Tower to govern multi-account AWS environments at scale - G...
Amazon Web Services
 
Building the Business Case for AWS
Building the Business Case for AWSBuilding the Business Case for AWS
Building the Business Case for AWS
Amazon Web Services
 
What is AWS?
What is AWS?What is AWS?
What is AWS?
Martin Yan
 
Introduction to Amazon Web Services
Introduction to Amazon Web ServicesIntroduction to Amazon Web Services
Introduction to Amazon Web Services
James Armes
 
Introduction to AWS Security
Introduction to AWS SecurityIntroduction to AWS Security
Introduction to AWS Security
Amazon Web Services
 
AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019
Amazon Web Services
 
AWS Control Tower를 통한 클라우드 보안 및 거버넌스 설계 - 김학민 :: AWS 클라우드 마이그레이션 온라인
AWS Control Tower를 통한 클라우드 보안 및 거버넌스 설계 - 김학민 :: AWS 클라우드 마이그레이션 온라인AWS Control Tower를 통한 클라우드 보안 및 거버넌스 설계 - 김학민 :: AWS 클라우드 마이그레이션 온라인
AWS Control Tower를 통한 클라우드 보안 및 거버넌스 설계 - 김학민 :: AWS 클라우드 마이그레이션 온라인
Amazon Web Services Korea
 
AWS Enterprise Day | Journey to the AWS Cloud
AWS Enterprise Day | Journey to the AWS CloudAWS Enterprise Day | Journey to the AWS Cloud
AWS Enterprise Day | Journey to the AWS Cloud
Amazon Web Services
 
AWS Summit Seoul 2023 | 삼성전자/쿠팡의 대규모 트래픽 처리를 위한 클라우드 네이티브 데이터베이스 활용
AWS Summit Seoul 2023 | 삼성전자/쿠팡의 대규모 트래픽 처리를 위한 클라우드 네이티브 데이터베이스 활용AWS Summit Seoul 2023 | 삼성전자/쿠팡의 대규모 트래픽 처리를 위한 클라우드 네이티브 데이터베이스 활용
AWS Summit Seoul 2023 | 삼성전자/쿠팡의 대규모 트래픽 처리를 위한 클라우드 네이티브 데이터베이스 활용
Amazon Web Services Korea
 
Breaking Down the Economics and TCO of Migrating to AWS
Breaking Down the Economics and TCO of Migrating to AWSBreaking Down the Economics and TCO of Migrating to AWS
Breaking Down the Economics and TCO of Migrating to AWS
Amazon Web Services
 
Cost Optimisation on AWS
Cost Optimisation on AWSCost Optimisation on AWS
Cost Optimisation on AWS
Amazon Web Services
 
Introduction to Amazon Relational Database Service
Introduction to Amazon Relational Database ServiceIntroduction to Amazon Relational Database Service
Introduction to Amazon Relational Database Service
Amazon Web Services
 
Designing security & governance via AWS Control Tower & Organizations - SEC30...
Designing security & governance via AWS Control Tower & Organizations - SEC30...Designing security & governance via AWS Control Tower & Organizations - SEC30...
Designing security & governance via AWS Control Tower & Organizations - SEC30...
Amazon Web Services
 

What's hot (20)

Amazon Macie Demo
Amazon Macie DemoAmazon Macie Demo
Amazon Macie Demo
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 
AWS solution Architect Associate study material
AWS solution Architect Associate study materialAWS solution Architect Associate study material
AWS solution Architect Associate study material
 
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
 
Getting Started with AWS Database Migration Service
Getting Started with AWS Database Migration ServiceGetting Started with AWS Database Migration Service
Getting Started with AWS Database Migration Service
 
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
AWS Training For Beginners | AWS Certified Solutions Architect Tutorial | AWS...
 
AWS 101
AWS 101AWS 101
AWS 101
 
Using AWS Control Tower to govern multi-account AWS environments at scale - G...
Using AWS Control Tower to govern multi-account AWS environments at scale - G...Using AWS Control Tower to govern multi-account AWS environments at scale - G...
Using AWS Control Tower to govern multi-account AWS environments at scale - G...
 
Building the Business Case for AWS
Building the Business Case for AWSBuilding the Business Case for AWS
Building the Business Case for AWS
 
What is AWS?
What is AWS?What is AWS?
What is AWS?
 
Introduction to Amazon Web Services
Introduction to Amazon Web ServicesIntroduction to Amazon Web Services
Introduction to Amazon Web Services
 
Introduction to AWS Security
Introduction to AWS SecurityIntroduction to AWS Security
Introduction to AWS Security
 
AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019
 
AWS Control Tower를 통한 클라우드 보안 및 거버넌스 설계 - 김학민 :: AWS 클라우드 마이그레이션 온라인
AWS Control Tower를 통한 클라우드 보안 및 거버넌스 설계 - 김학민 :: AWS 클라우드 마이그레이션 온라인AWS Control Tower를 통한 클라우드 보안 및 거버넌스 설계 - 김학민 :: AWS 클라우드 마이그레이션 온라인
AWS Control Tower를 통한 클라우드 보안 및 거버넌스 설계 - 김학민 :: AWS 클라우드 마이그레이션 온라인
 
AWS Enterprise Day | Journey to the AWS Cloud
AWS Enterprise Day | Journey to the AWS CloudAWS Enterprise Day | Journey to the AWS Cloud
AWS Enterprise Day | Journey to the AWS Cloud
 
AWS Summit Seoul 2023 | 삼성전자/쿠팡의 대규모 트래픽 처리를 위한 클라우드 네이티브 데이터베이스 활용
AWS Summit Seoul 2023 | 삼성전자/쿠팡의 대규모 트래픽 처리를 위한 클라우드 네이티브 데이터베이스 활용AWS Summit Seoul 2023 | 삼성전자/쿠팡의 대규모 트래픽 처리를 위한 클라우드 네이티브 데이터베이스 활용
AWS Summit Seoul 2023 | 삼성전자/쿠팡의 대규모 트래픽 처리를 위한 클라우드 네이티브 데이터베이스 활용
 
Breaking Down the Economics and TCO of Migrating to AWS
Breaking Down the Economics and TCO of Migrating to AWSBreaking Down the Economics and TCO of Migrating to AWS
Breaking Down the Economics and TCO of Migrating to AWS
 
Cost Optimisation on AWS
Cost Optimisation on AWSCost Optimisation on AWS
Cost Optimisation on AWS
 
Introduction to Amazon Relational Database Service
Introduction to Amazon Relational Database ServiceIntroduction to Amazon Relational Database Service
Introduction to Amazon Relational Database Service
 
Designing security & governance via AWS Control Tower & Organizations - SEC30...
Designing security & governance via AWS Control Tower & Organizations - SEC30...Designing security & governance via AWS Control Tower & Organizations - SEC30...
Designing security & governance via AWS Control Tower & Organizations - SEC30...
 

Similar to Building a web application without servers

Building scalable OTT workflows on AWS - Serverless Video Workflows
Building scalable OTT workflows on AWS - Serverless Video WorkflowsBuilding scalable OTT workflows on AWS - Serverless Video Workflows
Building scalable OTT workflows on AWS - Serverless Video Workflows
Amazon Web Services
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
Amazon Web Services
 
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopRaleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Amazon Web Services
 
The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017
Amazon Web Services
 
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T... Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Amazon Web Services
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
Amazon Web Services
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform Services
Amazon Web Services
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS
SmartWave
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
Amazon Web Services
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
Kristana Kane
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
Amazon Web Services
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
Amazon Web Services
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
Amazon Web Services
 
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Amazon Web Services
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
Amazon Web Services
 
Build a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million UsersBuild a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million Users
Amazon Web Services
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
Amazon Web Services
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
AWS Vietnam Community
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
Amazon Web Services
 
Serverless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversServerless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about servers
Amazon Web Services
 

Similar to Building a web application without servers (20)

Building scalable OTT workflows on AWS - Serverless Video Workflows
Building scalable OTT workflows on AWS - Serverless Video WorkflowsBuilding scalable OTT workflows on AWS - Serverless Video Workflows
Building scalable OTT workflows on AWS - Serverless Video Workflows
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
 
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopRaleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshop
 
The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017
 
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T... Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform Services
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Build a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million UsersBuild a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million Users
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Serverless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversServerless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about servers
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
Amazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
Amazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
Amazon Web Services
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Amazon Web Services
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
Amazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
Amazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Amazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
Amazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Amazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
Amazon Web Services
 
AWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei serverAWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei server
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
 
AWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei serverAWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei server
 

Building a web application without servers

  • 1. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Building a web application without servers Raymond Lai Solutions Architect raymlai@amazon.com
  • 2. Running servers makes me sad Photo by Justin Veenema
  • 3. <start> It’s easier than ever to build web applications that are: • Massively scalable • Highly available and fault-tolerant • Easily secured • Cost-aligned with usage Without: • Managing a single server or container orchestration system • Patching operating systems • Monitoring operating system metrics to control scaling
  • 5. With serverless No infrastructure provisioning, no management Automatic scaling Pay for value Highly available and secure
  • 6. Exploring a basic web application technology stack InternetMobile/ Web apps ?Frontend ?Backend ?Database
  • 7. Exploring a basic web application technology stack InternetMobile/ Web apps ?Backend ?Database ?Frontend
  • 8. Frontend servers • Serve mostly static contents • HTML • CSS • JavaScript • Image, video, etc. • Might generate dynamic contents with languages like PHP • Reactive Web Framework • Non-blocking and event-driven applications • Using declarative approach • With interface library and data request capabilities • Easier to support multiple platforms PastPresent
  • 9. Two options for serverless hosting of static content Roll your own with Amazon Simple Storage Service (Amazon S3) Amazon S3 AWS Amplify CLI & Amplify Console AWS Amplify
  • 10. Amazon S3 Amazon S3 • Can host static websites • Supports fine-grained permission control • Acts as a logging endpoint for Web services • Supports encryption at transit and at rest • Lifecycle capabilities to rotate data across tiers and even delete them if needed Amazon CloudFront • Cache static content at the edge for faster delivery • Dynamic and static content • Custom SSL certificates • Low TTLs (as short as 0 seconds) Responsetime Serverload Response time Server load Response time Server load No CDN CDN for static content CDN for static and dynamic content
  • 11. AWS Amplify makes it easy to create, configure, and implement scalable mobile and web apps powered by AWS • Framework • Cloudservices • Developertools • Continuousdeployment • Hosting
  • 13. AWS Amplify Step 2: “amplify add hosting” & define repository
  • 14. AWS Amplify Hosting for static web applications • Integrated with Git • Built-in CI/CD workflows (supports Git branches) • Host a friendly URL with CDN • Support for auth controls • Built-in rewrites and redirects of URL • Deploy SPA with popular frontend frameworks such as Vue, Angular, and React AWS Amplify
  • 15. InternetMobile/Web apps Exploring a basic web application technology stack ?Backend ?DatabaseAWS Amplify
  • 16. AWS Amplify Exploring a basic web application technology stack ?InternetMobile/Web apps ?Database ?Backend
  • 17. APIs are the front door of modern applications
  • 18. To put it simply: Amazon API Gateway makes it easy to host serverless APIs
  • 19. Amazon API Gateway: Types of APIs Amazon API Gateway API Gateway cache Amazon CloudWatch monitoring Fully managed CloudFront distribution Edge-optimizedRegionalPrivate Edge-optimized • Utilizes CloudFront to reduce TLS connection overhead (reduces roundtrip time) • Designed for a globally distributed set of clients Regional • Recommended API type for general use cases • Designed for building APIs for clients in the same region Private • Only accessible from within VPC (and networks connected to VPC) • Designed for building APIs used internally or by private microservices AWS Lambda functions Any other AWS service
  • 20. Secure with your Amazon API Gateway Several mechanisms for adding authorization/authentication and restricting API access • IAM permissions – use IAM policies and AWS credentials to grant access • Lambda authorizers – use Lambda to validate a bearer token (e.g., OAuth or SAML) or request parameters and grant access • Amazon Cognito user pools – create a completely managed user management system • Resource policies – can restrict based on IP, VPC, and AWS Account ID
  • 21. AWS Amplify InternetMobile/Web apps Exploring a basic web application technology stack ?DatabaseAmazon API Gateway ?
  • 22. Event-driven compute Functions as a service Serverless FaaS AWS Lambda
  • 23. Serverless applications Services (anything) Changes in data state Requests to endpoints Changes in resource state Event source Function Node.js Python Java C# Go Ruby Runtime API Serverless applications Services (anything) Changes in data state Requests to endpoints Changes in resource state Event source Function Node.js Python Java C# Go Ruby Runtime API Serverless applications Services (anything) Changes in data state Requests to endpoints Changes in resource state Event source Function Node.js Python Java C# Go Ruby Runtime API
  • 24. Lambda execution model Synchronous (push) Asynchronous (event) Stream (poll-based) /order Amazon API Gateway Lambda function Amazon DynamoDB Amazon Kinesis changes AWS Lambda service Lambda function Amazon SNS Amazon S3 reqs Lambda function
  • 25. Smart resource allocation Stats for Lambda function that calculates 1000 times all prime numbers <= 1000000 128 MB 11.722965 sec $0.024628 256 MB 6.678945 sec $0.028035 512 MB 3.194954 sec $0.026830 1024 MB 1.465984 sec $0.024638 Best Worst Lambda exposes only a memory control, with the % of CPU core and network capacity allocated to a function proportionally Match resource allocation (up to 3 GB) to logic
  • 26. Lambda permissions model Function policies • “Actions on bucket X can invoke Lambda function Z" • Resource policies allow for cross-account access • Used for sync and async invocations Execution role • “Lambda function A can read from DynamoDB table users” • Define what AWS resources / API calls this function can access via IAM • Used in streaming invocations Event source ServicesFunction
  • 27. AWS Amplify InternetMobile/Web apps Exploring a basic web application technology stack ?DatabaseAmazon API Gateway AWS Lambda
  • 28. Mobile/Web apps Internet AWS Amplify Exploring a basic web application technology stack Amazon API Gateway AWS Lambda ?Database
  • 29. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 30. Common data categories Relational Key value Document In memory Graph Time series Ledger Aurora, RDS DynamoDB Amazon DocumentDB ElastiCache Neptune Timestream QLDBAWS Service(s)
  • 31. Amazon DynamoDB Fast and flexible NoSQL database service for any scale Enterprise-ready ACID transactions Encryption at rest On-demand backup and restore Performance at scale Handles millions of requests per second Delivers microsecond latency Automated global replication Serverless Maintenance-free Auto scaling On-demand capacity mode
  • 32. Why we choose DynamoDB? All Amazon database services have: • Easy scale controls + ability to handle massive scale • High availability and durability • Backup/restore capabilities • Billing options that can scale with your business need But in sticking with the theme of serverless, DynamoDB wins out: • Pay-for-what-you-use billing • Dynamic scaling without the need to preconfigure capacity Again, most of this will depend on what your use case is
  • 33. AWS Amplify Exploring a basic web application technology stack Amazon API Gateway AWS Lambda Amazon DynamoDB Mobile/Web apps Internet
  • 34. </end> By combining these services, we can build a completely serverless application stack • No servers to manage • Automatic scalability to handle most workloads • High availability and fault tolerance out of the box • Numerous security controls throughout the stack • Aligned costs to consumption
  • 35. Thank you! © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Raymond Lai raymlai@amazon.com