© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SSID: Guest
Password: Cube@11999
Websites go Serverless
Boaz Ziniman
Technical Evangelist, Amazon Web Service
@ziniman
boaz.ziniman.aws
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Floor28 Agenda
GameDay
24 Oct
Enterprise IT Day
23 Oct
Builders Day
AppSync, Alexa & IoT
22 Oct
Big Data Day
14 Oct
ML & DL Day
15 Oct
DevOps Day
16 Oct
DevOps Day
17 Oct
Technical Sessions
Serverless Data Workshop
Big Data UG Meetup
Technical Sessions
SageMaker Workshop
ML&DL Meetup
Technical Sessions
K8s Workshop
DevOps Meetup
Technical Sessions
Spot Workshop
Databases Day
18 Oct
Technical Sessions
Serverless Workshop
Virtual assistants UG Meetup
Technical Sessions
PyTorch Meetup
Technical Sessions
CDK Workshop
AWS IL UG Meetup
Builders Day
Serverless backend
21 Oct
Technical Sessions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is
Serverless?
Build and run applications
without thinking about servers
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Evolving to Serverless
SERVERLESS
Virtual servers
in the cloud
Physical servers
in datacenters
Virtual servers
in datacenters
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
No server is easier to manage than any server
All of these responsibilities
go away
Provisioning and utilization
Availability and fault tolerance
Scaling
Operations and management
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What does Serverless mean?
No servers to provision or
manage
Scale with your usage
Built in availability and
fault-tolerance
Never pay for idle/unused
capacity
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless applications
FUNCTION SERVICES (ANYTHING)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Node
Python
Java
C#
.Net Core 2.0
Go
EVENT SOURCE
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Websites architecture
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Three-tier web application architecture
https://d0.awsstatic.com/whitepapers/AWS_Serverless_Multi-Tier_Architectures.pdf
Presentation Tier Logic Tier Data Tier
Website Web Server Database
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Here is what that translates to in real life
http://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_web_01.pdf
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless Website?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Web application
Data stored in
Amazon
DynamoDB
Dynamic content
in AWS Lambda
Amazon API
Gateway
Browser
Amazon
CloudFront
Amazon S3
Amazon Cognito
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon API
Gateway AWS
Lambda
Amazon
DynamoDB
Amazon
S3
Amazon
CloudFront
• Bucket Policies
• ACLs
• Origin Access Identity (OAI)
• Geo-Restriction
• Signed Cookies
• Signed URLs
• DDOS Protection
IAM IAM
Serverless web app security
• Throttling
• Caching
• Usage Plans
• ACM
Static Content
Browser
Amazon Cognito
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Custom
Authorizer
Lambda
functionClient
Lambda
function
Amazon API
Gateway
Amazon
DynamoDB
AWS Identity &
Access Management
SAML
Two types:
• TOKEN - authorization token
passed in a header
• REQUEST – all headers, query
strings, paths, stage variables or
context variables.Custom
Authorizer
Cognito
User Pool
Custom Authorizers
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multi-Region with API Gateway
us-west-2
us-east-1
Client
Amazon
Route 53
Regional
API
Endpoint
Regional
API
Endpoint
Custom
Domain
Name
Custom
Domain
Name
API Gateway
API Gateway
Lambda
Lambda
api.mycorp.com
CNAME
CNAM
E
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
http://bit.ly/ServerlessShop
https://github.com/patrick-michelberger/serverless-shop
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless Website – reko.ziniman.com
Static Site
bucket
Amazon
DynamoDB
Amazon
CloudFront
Amazon
Rekognition
Amazon
Cognito Identity Pool
JavaScript
SDK
Lambda
function
Images
bucket
role
https://reko.ziniman.com
• Write images into Images Bucket
• Read list of images
• Read data from DynamoDB
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless Website – reko.ziniman.com
Static Site
bucket
Amazon
DynamoDB
Amazon
CloudFront
role
Amazon
Rekognition
Amazon
Cognito Identity Pool
JavaScript
SDK
Lambda
function
Images
bucket
role
• Write images into Images Bucket
• Read list of images
• Read data from DynamoDB
• Read images from Images Bucket
• Execute Rekognition
• Write data to DynamoDB
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless Website – reko.ziniman.com
Static Site
bucket
Amazon
DynamoDB
Amazon
CloudFront
Amazon
Rekognition
JavaScript
SDK
Images
bucket
API
GAteway
Lambda
function
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless Website – reko.ziniman.com
Static Site
bucket
Amazon
DynamoDB
Amazon
CloudFront
Amazon
Rekognition
JavaScript
SDK
Images
bucket
API
GAteway
Lambda
function
[
{"photo_id": "IMG_2018920-213126787.jpg”},
{"photo_id": "IMG_2018920-213320377.jpg"}
]
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What will you build?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank You!
Boaz Ziniman
Technical Evangelist, Amazon Web Service
Give me feedback – Talk to my Bot
m.me/boaz.ziniman.aws
@ziniman
boaz.ziniman.aws
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SSID: Guest
Password: Cube@11999
GAME DAY
PUT YOUR SKILLS TO THE TEST
OCT 24
Register now: bit.ly/Floor28GameDay

Websites go Serverless - Floor28

  • 1.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. SSID: Guest Password: Cube@11999 Websites go Serverless Boaz Ziniman Technical Evangelist, Amazon Web Service @ziniman boaz.ziniman.aws
  • 2.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Floor28 Agenda GameDay 24 Oct Enterprise IT Day 23 Oct Builders Day AppSync, Alexa & IoT 22 Oct Big Data Day 14 Oct ML & DL Day 15 Oct DevOps Day 16 Oct DevOps Day 17 Oct Technical Sessions Serverless Data Workshop Big Data UG Meetup Technical Sessions SageMaker Workshop ML&DL Meetup Technical Sessions K8s Workshop DevOps Meetup Technical Sessions Spot Workshop Databases Day 18 Oct Technical Sessions Serverless Workshop Virtual assistants UG Meetup Technical Sessions PyTorch Meetup Technical Sessions CDK Workshop AWS IL UG Meetup Builders Day Serverless backend 21 Oct Technical Sessions
  • 3.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Serverless? Build and run applications without thinking about servers
  • 4.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Evolving to Serverless SERVERLESS Virtual servers in the cloud Physical servers in datacenters Virtual servers in datacenters
  • 5.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. No server is easier to manage than any server All of these responsibilities go away Provisioning and utilization Availability and fault tolerance Scaling Operations and management
  • 6.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What does Serverless mean? No servers to provision or manage Scale with your usage Built in availability and fault-tolerance Never pay for idle/unused capacity
  • 7.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless applications FUNCTION SERVICES (ANYTHING) Changes in data state Requests to endpoints Changes in resource state Node Python Java C# .Net Core 2.0 Go EVENT SOURCE
  • 8.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Websites architecture
  • 9.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Three-tier web application architecture https://d0.awsstatic.com/whitepapers/AWS_Serverless_Multi-Tier_Architectures.pdf Presentation Tier Logic Tier Data Tier Website Web Server Database
  • 10.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Here is what that translates to in real life http://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_web_01.pdf
  • 11.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Serverless Website?
  • 12.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Web application Data stored in Amazon DynamoDB Dynamic content in AWS Lambda Amazon API Gateway Browser Amazon CloudFront Amazon S3 Amazon Cognito
  • 13.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon API Gateway AWS Lambda Amazon DynamoDB Amazon S3 Amazon CloudFront • Bucket Policies • ACLs • Origin Access Identity (OAI) • Geo-Restriction • Signed Cookies • Signed URLs • DDOS Protection IAM IAM Serverless web app security • Throttling • Caching • Usage Plans • ACM Static Content Browser Amazon Cognito
  • 14.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Custom Authorizer Lambda functionClient Lambda function Amazon API Gateway Amazon DynamoDB AWS Identity & Access Management SAML Two types: • TOKEN - authorization token passed in a header • REQUEST – all headers, query strings, paths, stage variables or context variables.Custom Authorizer Cognito User Pool Custom Authorizers
  • 15.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Multi-Region with API Gateway us-west-2 us-east-1 Client Amazon Route 53 Regional API Endpoint Regional API Endpoint Custom Domain Name Custom Domain Name API Gateway API Gateway Lambda Lambda api.mycorp.com CNAME CNAM E
  • 16.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. http://bit.ly/ServerlessShop https://github.com/patrick-michelberger/serverless-shop
  • 17.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Demo
  • 18.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless Website – reko.ziniman.com Static Site bucket Amazon DynamoDB Amazon CloudFront Amazon Rekognition Amazon Cognito Identity Pool JavaScript SDK Lambda function Images bucket role https://reko.ziniman.com • Write images into Images Bucket • Read list of images • Read data from DynamoDB
  • 19.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless Website – reko.ziniman.com Static Site bucket Amazon DynamoDB Amazon CloudFront role Amazon Rekognition Amazon Cognito Identity Pool JavaScript SDK Lambda function Images bucket role • Write images into Images Bucket • Read list of images • Read data from DynamoDB • Read images from Images Bucket • Execute Rekognition • Write data to DynamoDB
  • 20.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless Website – reko.ziniman.com Static Site bucket Amazon DynamoDB Amazon CloudFront Amazon Rekognition JavaScript SDK Images bucket API GAteway Lambda function
  • 21.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless Website – reko.ziniman.com Static Site bucket Amazon DynamoDB Amazon CloudFront Amazon Rekognition JavaScript SDK Images bucket API GAteway Lambda function [ {"photo_id": "IMG_2018920-213126787.jpg”}, {"photo_id": "IMG_2018920-213320377.jpg"} ]
  • 22.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. What will you build?
  • 23.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Thank You! Boaz Ziniman Technical Evangelist, Amazon Web Service Give me feedback – Talk to my Bot m.me/boaz.ziniman.aws @ziniman boaz.ziniman.aws
  • 24.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. SSID: Guest Password: Cube@11999 GAME DAY PUT YOUR SKILLS TO THE TEST OCT 24 Register now: bit.ly/Floor28GameDay