Deep Dive: AWS Lambda
-
Upload
amazon-web-services -
Category
Technology
-
view
674 -
download
1
Transcript of Deep Dive: AWS Lambda
![Page 1: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/1.jpg)
AWS Pop-up Loft LondonDeep Dive: AWS Lambda
Danilo Poccia @danilop danilop
![Page 2: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/2.jpg)
You Want to BuildYour Brand New Application
![Page 3: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/3.jpg)
Application+
Data
![Page 4: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/4.jpg)
Application+
Data
Websites
Mobile Apps
Wearable
![Page 5: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/5.jpg)
Application Data
Websites
Mobile Apps
Wearable
![Page 6: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/6.jpg)
Application
Files
DB
Content +Some API Calls
API Calls
Websites
Mobile Apps
Wearable
![Page 7: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/7.jpg)
Application
Files
DB
API Calls
Websites(JavaScript
Apps)
Mobile Apps
Wearable
JavaScript
API Calls
![Page 8: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/8.jpg)
Application
Files
DB
API Calls
Websites(JavaScript
Apps)
Mobile Apps
Wearable
Services
API Calls
JavaScript
API Calls
![Page 9: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/9.jpg)
Application
Files
DB
API Calls
Websites(JavaScript
Apps)
Mobile Apps
Wearable
Services
API Calls
JavaScriptAuthentication& Authorization
Caching & Throttling
Business Logic
API Calls
![Page 10: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/10.jpg)
Application
DB
API Calls
Websites(JavaScript
Apps)
Mobile Apps
Wearable
Services
API Calls
JavaScript
Files
AmazonS3
AmazonDynamoDB
Authentication & Authorization
AmazonCognito
Business Logic
AWSLambda
Caching & Throttling
Amazon APIGatewayAPI Calls
![Page 11: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/11.jpg)
How Does It Works?
![Page 12: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/12.jpg)
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
![Page 13: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/13.jpg)
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
![Page 14: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/14.jpg)
AmazonCloudFront
API Gateway Cache
AmazonCloudWatch
Monitoring & Logs
Endpoints onAmazon EC2 or
AWS Elastic Beanstalk
Internet
Any other publicly accessible endpoint
AWS Lambda Functions
Caching & Throttling
Amazon APIGateway
X
Access toAPI Method
![Page 15: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/15.jpg)
![Page 16: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/16.jpg)
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 Support
Request / Response Data Transformation and API Mocking
![Page 17: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/17.jpg)
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
![Page 18: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/18.jpg)
Build Back-end Services that Perform at Scale
Respond Quickly to New Information
Run Your Code without Managing Infrastructure
Cost-effective and Efficient
![Page 19: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/19.jpg)
Amazon API Gateway+
AWS Lambda
![Page 20: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/20.jpg)
Resource + HTTP Verb ➔ Method (Function)
![Page 21: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/21.jpg)
Resource + HTTP Verb ➔ Method (Function)
/books + GET ➔ GetAllBooksByRange
![Page 22: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/22.jpg)
Resource + HTTP Verb ➔ Method (Function)
/books + GET ➔ GetAllBooksByRange
/books + POST ➔ CreateNewBook
![Page 23: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/23.jpg)
Resource + HTTP Verb ➔ Method (Function)
/books + GET ➔ GetAllBooksByRange
/books + POST ➔ CreateNewBook
/books/{id} + GET ➔ GetBookById
/books/{id} + PUT ➔ CreateOrUpdateBookById
/books/{id} + DELETE ➔ DeleteBookById
![Page 24: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/24.jpg)
<demo>…
</demo>
![Page 25: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/25.jpg)
Let’s Put Everything Together
![Page 26: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/26.jpg)
Media Sharing Application
![Page 27: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/27.jpg)
λ
λ λ
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
![Page 28: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/28.jpg)
λ
λ λ
λ
λ
λλ
λ
λ
λ
![Page 29: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/29.jpg)
Microservice Architecture
λλ λλ
λλ λλ λ
λ
![Page 30: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/30.jpg)
Choreography vs Orchestration
λλ λλ
λλ λλ λ
λ
![Page 31: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/31.jpg)
Reactive Programming
λλ λλ
λλ λλ λ
λ
![Page 32: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/32.jpg)
Asynchronous Communication
λλ λλ
λλ λλ λ
λ
![Page 33: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/33.jpg)
Eventual Consistency
λλ λλ
λλ λλ λ
λ
![Page 34: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/34.jpg)
Focus on You Idea
![Page 36: Deep Dive: AWS Lambda](https://reader034.fdocuments.net/reader034/viewer/2022050914/58f12cbe1a28ab0d318b45ab/html5/thumbnails/36.jpg)
Danilo Poccia @danilop danilop
Thank You