SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
© 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

Mais conteúdo relacionado

Mais procurados

An Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - WebinarAn Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - WebinarAmazon Web Services
 
Cloud Migration, Application Modernization, and Security
Cloud Migration, Application Modernization, and Security Cloud Migration, Application Modernization, and Security
Cloud Migration, Application Modernization, and Security Tom Laszewski
 
AWS Control Tower
AWS Control TowerAWS Control Tower
AWS Control TowerCloudHesive
 
AWS Cloud Security & Compliance Basics Webinar
AWS Cloud Security & Compliance Basics WebinarAWS Cloud Security & Compliance Basics Webinar
AWS Cloud Security & Compliance Basics WebinarAmazon Web Services
 
Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)Amazon Web Services
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAmazon Web Services
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018Amazon Web Services
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsAmazon Web Services
 
AWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAmazon Web Services
 
ABCs of AWS: S3
ABCs of AWS: S3ABCs of AWS: S3
ABCs of AWS: S3Mark Cohen
 
What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?Amazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateAmazon Web Services
 
Overview of AWS by Andy Jassy - SVP, AWS
Overview of AWS by Andy Jassy - SVP, AWSOverview of AWS by Andy Jassy - SVP, AWS
Overview of AWS by Andy Jassy - SVP, AWSAmazon Web Services
 

Mais procurados (20)

An Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - WebinarAn Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - Webinar
 
Cloud Migration, Application Modernization, and Security
Cloud Migration, Application Modernization, and Security Cloud Migration, Application Modernization, and Security
Cloud Migration, Application Modernization, and Security
 
AWS Control Tower
AWS Control TowerAWS Control Tower
AWS Control Tower
 
AWS Cloud Security & Compliance Basics Webinar
AWS Cloud Security & Compliance Basics WebinarAWS Cloud Security & Compliance Basics Webinar
AWS Cloud Security & Compliance Basics Webinar
 
AWS Cost Management Workshop
AWS Cost Management WorkshopAWS Cost Management Workshop
AWS Cost Management Workshop
 
Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)
 
Introduction to AWS Security
Introduction to AWS SecurityIntroduction to AWS Security
Introduction to AWS Security
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless Cloud
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
Security & Compliance in AWS
Security & Compliance in AWSSecurity & Compliance in AWS
Security & Compliance in AWS
 
AWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best Practices
 
AWS Security Best Practices
AWS Security Best PracticesAWS Security Best Practices
AWS Security Best Practices
 
Introduction of AWS KMS
Introduction of AWS KMSIntroduction of AWS KMS
Introduction of AWS KMS
 
ABCs of AWS: S3
ABCs of AWS: S3ABCs of AWS: S3
ABCs of AWS: S3
 
What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?
 
AWS Technical Essentials Day
AWS Technical Essentials DayAWS Technical Essentials Day
AWS Technical Essentials Day
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
 
Security Architectures on AWS
Security Architectures on AWSSecurity Architectures on AWS
Security Architectures on AWS
 
Overview of AWS by Andy Jassy - SVP, AWS
Overview of AWS by Andy Jassy - SVP, AWSOverview of AWS by Andy Jassy - SVP, AWS
Overview of AWS by Andy Jassy - SVP, AWS
 

Semelhante a 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 WorkflowsAmazon Web Services
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingAmazon 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 workshopAmazon 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 2017Amazon 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 UsersAmazon 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 ServicesAmazon 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 AWSSmartWave
 
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 ComputingKristana 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 CloudAmazon 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 ComputingAmazon 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 UsersAmazon 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 CloudAmazon 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 UsersAmazon 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 CloudAmazon 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 CloudAmazon 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 serversAmazon Web Services
 

Semelhante a 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
 

Mais de 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 FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon 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
 
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 WorkloadsAmazon 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 sfatareAmazon 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 NodeJSAmazon 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 webAmazon 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 sfatareAmazon 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 AWSAmazon 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 DeckAmazon 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
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon 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 AWSAmazon Web Services
 

Mais de 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...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 
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
 

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