building event-driven serverless applications
TRANSCRIPT
Application
Files
DB
API Calls
Websites(JavaScript
Apps)
Mobile Apps
Wearable
Services
API Calls
JavaScript
API Calls
Application
Files
DB
API Calls
Websites(JavaScript
Apps)
Mobile Apps
Wearable
Services
API Calls
JavaScriptAuthentication& Authorization
APIManagement,
Caching & Throttling
Business Logic
API Calls
Application
DB
API Calls
Websites(JavaScript
Apps)
Mobile Apps
Wearable
Services
API Calls
JavaScript
Files
AmazonS3
AmazonDynamoDB
API Calls
Authentication& Authorization
APIManagement,
Caching & Throttling
Business Logic
Application
DB
API Calls
Websites(JavaScript
Apps)
Mobile Apps
Wearable
Services
API Calls
JavaScript
Files
AmazonS3
AmazonDynamoDB
Authentication & Authorization
AmazonCognito
Business Logic
AWSLambda
API Management,Caching & Throttling
Amazon APIGatewayAPI Calls
X
AuthenticationProviders
End Users
User Credentials
AuthenticationToken
Amazon CognitoIdentity Broker
Identity Pool Id(Token)
Identity IdAWS Temp Credentials
(Depending onAuth / Unauth Role)
Access toAWS Services
(Including AmazonAPI Gateway)
Identity IdAWS Temp Credentials
Amazon S3
AmazonDynamoDB
AmazonMobile Analytics
Amazon CognitoSync Store
K / V
Authentication & Authorization
AmazonCognitoCheck Token
X
End Users
User Credentials
AuthenticationToken
Amazon CognitoIdentity Broker
Identity Pool Id(Token)
Identity IdAWS Temp Credentials
(Depending onAuth / Unauth Role)
Access toAWS Services
(Including AmazonAPI Gateway)
Identity IdAWS Temp Credentials
Amazon S3
AmazonDynamoDB
AmazonMobile Analytics
Amazon CognitoSync Store
K / V
Custom Authentication
ServiceGet Token
Token Authentication & Authorization
AmazonCognito
X
End Users
User Credentials
AuthenticationToken
Amazon CognitoIdentity Broker
Identity Pool Id(Token)
Identity IdAWS Temp Credentials
(Depending onAuth / Unauth Role)
Access toAWS Services
(Including AmazonAPI Gateway)
Identity IdAWS Temp Credentials
Amazon S3
AmazonDynamoDB
AmazonMobile Analytics
Amazon CognitoSync Store
K / V
Amazon CognitoUser Pools
Get Token
Token Authentication & Authorization
AmazonCognito
AmazonCloudFront
API Gateway Cache
AmazonCloudWatch
Monitoring & Logs
Endpoints onAmazon EC2 or
AWS Elastic Beanstalk
Internet
Any other publicly accessible endpoint
AWS Lambda Functions
API Management,Caching & Throttling
Amazon APIGateway
X
Access toAPI Method
Managed Cache to Store API Responses
Reduced Latency and DDoS Protection through Amazon CloudFront
SDK Generation for iOS, Android and JavaScript
HTTP 429 Response for API Throttling (Managed by the SDK)
Swagger Import / Export Support
Request / Response Data Transformation and API Mocking
Custom Authorization
Business Logic
AWSLambda
AWSLambda
Functions
AmazonAPI Gateway Amazon S3
AmazonDynamoDB
Amazon CognitoSync Store
K / VAmazonSNS
AmazonKinesis
Alexa Skills Kit (ASK)Alexa Voice Service (AVS)
HTTPSInvoke
CustomEvents
HTTPSREST
API Call
AmazonSES
AmazonSWF
AWS IoT
?
?
?
?
???
AmazonCloudWatch
Events
Build Back-end Services that Perform at Scale
Respond Quickly to New Information
Run Your Code without Managing Infrastructure
Cost-effective and Efficient
Resource + HTTP Verb ➔ Method (Function)
/books + GET ➔ GetAllBooksByRange
/books + POST ➔ CreateNewBook
Resource + HTTP Verb ➔ Method (Function)
/books + GET ➔ GetAllBooksByRange
/books + POST ➔ CreateNewBook
/books/{id} + GET ➔ GetBookById
/books/{id} + PUT ➔ CreateOrUpdateBookById
/books/{id} + DELETE ➔ DeleteBookById
λ
λ λ
AmazonAPI Gateway
λ
λ
λλ
Bucket Usage Table
Media MetadataTable
User StatTable
User Location
Table
K / V
λ
λ
λ
Amazon CognitoIdentity Broker
Amazon CognitoSync Store
AmazonSNS
AmazonKinesis
Media Bucket
LogTable
Authentication &
AuthorizationUpload Picture / VideoUpdate Bucket UsageCheck Bucket Usage
Delete “Over Quota”
Media
Send Notification to
User / Application
Extract Metadata and Write on DB
Update User StatisticsCall REST API
to Get Media Description
Upload Location Info
Update User Location
Look for Users or Media
Near Current Location
Call REST API to Get
User Info
Sync Media and User
Rating
Write History of ChangesCheck and Update
Ratings
InvokeRead
Write / Send
The Serverless Manifesto
• Functions are the unit of deployment and scaling.• No machines, VMs, or containers visible in the programming model.• Permanent storage lives elsewhere.• Scales per request. Users cannot over- or under-provision capacity.• Never pay for idle (no cold servers/containers or their costs).• Implicitly fault tolerant because functions can run anywhere.• BYOC - Bring your own code.• Metrics and logging are a universal right.