SlideShare uma empresa Scribd logo
1 de 45
Baixar para ler offline
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Eric Johnson
@edjgeek
Asenkron Düşünme
/serverless/DAYS
Senior Developer Advocate - Serverless
ISTANBUL 2019
Background Image by skeeze from Pixabay
Unicorn image by https://istanbul.serverlessdays.io/
Thinking Asynchronously
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ben kimim?
• Sr. Geliştirici ‘Avukatı’ — Sunucusuz, AWS
• Sunucusuz/Takım/ Otomasyon Geek
• Yazılım Mimarı/Çözüm Mimarı
• Kocası – Brigitte
• Noah, Jake, Owen
Sophie Anne & Gracie Mae'ın babası
• Müzik aşığı
• Pizza/Diyet Dr. Pepper fanatik
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Who am I?
• Sr. Developer Advocate – Serverless, AWS
• Serverless / Tooling / Automation Geek
• Software Architect / Solutions Architect
• Husband to Brigitte
• Father to Noah, Jake, Owen
Sophie Anne, & Gracie Mae
• Music lover
• Pizza / Diet Dr. Pepper fanatic
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bugün
neden
buradayız?
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Synchronous vs. Asynchronous
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2. Lambda function(s) invoked
SNS topic
1. Data published to a topic
Data
Amazon SNS + Lambda
Simple, flexible, fully managed
pub/sub messaging and mobile
push notification service for high
throughput, highly reliable
message delivery
Messages are published to a topic
Topics can have multiple
subscribers (fanout)
Messages can be filtered and only
sent to certain subscribers
Lambda
function
Lambda
function
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2. Lambda function
invoked based on rule
Amazon EventBridge
1. Data published
to an event bus
Data
Amazon EventBridge + Lambda
Serverless event bus that allows easy
connection between applications, AWS
services, and third-party SaaS
applications
Easily consume events from supported
third-party SaaS applications
Define custom buses or use default bus
Dispatch to 15 AWS services
Generate custom events from your
application
Lambda
function
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1. Message
inserted into
to a queue
Message
Amazon
SQS3. SQS removes
message from
queue on
successful
response from
function
2. Lambda
function invoked
Amazon SQS + Lambda
Simple, flexible, fully managed
message queuing service for
reliably and continuously
exchanging any volume of
messages from anywhere
Processed in batches
At least once delivery
Visibility timeout allows for
handling of failures during
processingLambda
function
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2. Lambda
polls stream
Amazon
Kinesis
Stream
1. Data published to a
stream
3. Kinesis returns
stream data
Data
Amazon Kinesis Streams + Lambda
Fully managed, highly scalable service
for collecting and processing real-time
data streams for analytics and machine
learning
Stream consists of shards with a fixed
amount of capacity and throughput
Lambda receives batches (and
potentially batches of batches)
Different applications can consume the
same stream
Lambda
function
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Common patterns
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Common AWS Lambda use cases
Web Apps Backends Data Processing Chatbots Amazon Alexa IT Automation
• Static
websites
• Complex
web apps
• Packages
for Flask
and Express
• Apps &
services
• Mobile
• IoT
• Real time
• MapReduce
• Batch
• Powering
chatbot logic
• Powering
voice-enabled
apps
• Alexa Skills
Kit
• Policy engines
• Extending AWS
services
• Infrastructure
management
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Common AWS Lambda use cases
Web Apps
• Static
websites
• Complex
web apps
• Packages
for Flask
and Express
We are focusing
on web apps
today
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A common serverless web application
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Lambda
function(s)
Host BucketAmazon
CloudFront
Amazon
Cognito
User
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The “big Lambda function” approach
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Lambda function
User
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The “big Lambda function” approach
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Lambda function
User
One Lambda function
handles all business logic
• Ok for small applications
• Can get bloated as logic
gets complex
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The “many Lambda functions” approach
AWS Cloud
Amazon
DynamoDB
User Amazon API
Gateway
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The “many Lambda functions” approach
AWS Cloud
Amazon
DynamoDB
User Amazon API
Gateway
Multiple Lambda functions
• Single responsibility
• Easier to manage
• Logical splits
• Domain objects
• Resource
• Methods
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What happens when the functions need to talk?
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
User
Communication between functions
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Coupling is baaaad
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
User
Communication between functions
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Translation Demo
Synchronous “big Lambda function” example
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event data
{
"data":”Hello, welcome to my translation demo.",
"culture":[”fr-FR","tr-TR”,“de-DE”,”fr-CA”]
}
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Synchronous demo
AWS Cloud
Amazon API
Gateway
Lambda
function
Bucket
Amazon
Cognito
User
Amazon Translate
Each culture is sent to Amazon
Translate as a separate request1
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Synchronous demo
AWS Cloud
Amazon API
Gateway
Lambda
function
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Each translation is sent to
Amazon Polly for audio
rendering
2
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Synchronous demo
AWS Cloud
Amazon API
Gateway
Lambda
function
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
Audio files are save to an
Amazon S3 bucket3
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Synchronous demo
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Lambda
function
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
All records are written to Amazon
DynamoDB4
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Resulting Data
DynamoDB
S3
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Show me
the demo!!
http://bit.ly/serv-translate
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Translation Demo
Asynchronous “many Lambda functions” example
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous options
Amazon EventBridge
Amazon Simple Queue
Service
Amazon Simple
Notification Service
Amazon Kinesis
Data Streams
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Our demo will use these asynchronous options
Amazon EventBridge
Amazon Kinesis
Data Streams
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Our demo will use these asynchronous options
Amazon EventBridge
Amazon DynamoDB
Streams
DynamoDB uses Kinesis under
the hood for streams
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Our demo will use these asynchronous options
Amazon EventBridge
Amazon DynamoDB
Streams
Amazon Simple Storage
Service (S3)
We will also use
an S3 bucket
event
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Original request is written to
Amazon DynamoDB1
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Stream
Reader
EventBridge
DynamoDB Streams then triggers
a stream reader Lambda function
which parses the translation
requests
2
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Amazon TranslateStream
Reader
EventBridge Translate
The translations are then saved
to DynamoDB as separate
records
3
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
Stream
Reader
EventBridge
Audio
Translate
Each translation triggers the Stream Reader function which
creates an audio request and sends it to Amazon Polly who
saves the resulting file to an S3 bucket
4
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
Stream
Reader
EventBridge
Finalize
Audio
Translate
The bucket triggers a Lambda function
that adds an ACL to the file and saves the
record to DynamoDB
5
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
http://bit.ly/serv-translate
Show me
the demo!!
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo upgrade
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
Stream
Reader
EventBridge
Finalize
Audio
Translate
What if I wanted to add another step?
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo upgrade
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
Stream
Reader
EventBridge
Finalize
Audio
Translate
For example: Sentiment analysis
with Amazon Comprehend
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo upgrade
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
Stream
Reader
EventBridge
Finalize
Audio
Translate
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Asynchronous demo upgrade
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
Stream
Reader
Finalize
Audio
TranslateEventBridge
Amazon ComprehendSentiment
Options
• Add a new target to an
existing rule
• Create a separate event
for Comprehension in
EventBridge
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What we have built
AWS Cloud
Amazon API
Gateway
Amazon
DynamoDB
Endpoint
Bucket
Amazon
Cognito
User
Amazon Polly
Amazon Translate
Audio Bucket
Stream
Reader
Finalize
Audio
TranslateEventBridge
Amazon ComprehendSentiment
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Questions?
https://pixabay.com/illustrations/questions-font-who-what-how-why-2245264/
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Eric Johnson
@edjgeek
Image Source: https://pixabay.com/illustrations/thank-you-polaroid-letters-2490552/

Mais conteúdo relacionado

Mais procurados

Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Amazon Web Services
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019AWS Summits
 
Twelve-Factor App Methodology and Modern Applications | AWS Summit Tel Aviv 2019
Twelve-Factor App Methodology and Modern Applications | AWS Summit Tel Aviv 2019Twelve-Factor App Methodology and Modern Applications | AWS Summit Tel Aviv 2019
Twelve-Factor App Methodology and Modern Applications | AWS Summit Tel Aviv 2019AWS Summits
 
IOT311_Customer Stories of Things, Cloud, and Analytics on AWS
IOT311_Customer Stories of Things, Cloud, and Analytics on AWSIOT311_Customer Stories of Things, Cloud, and Analytics on AWS
IOT311_Customer Stories of Things, Cloud, and Analytics on AWSAmazon Web Services
 
Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018AWS Germany
 
From Code to a running container | AWS Summit Tel Aviv 2019
From Code to a running container | AWS Summit Tel Aviv 2019From Code to a running container | AWS Summit Tel Aviv 2019
From Code to a running container | AWS Summit Tel Aviv 2019AWS Summits
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKDonnie Prakoso
 
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
 
Building Chatbots with Amazon Lex
Building Chatbots with Amazon LexBuilding Chatbots with Amazon Lex
Building Chatbots with Amazon LexAmazon Web Services
 
NEW LAUNCH! AWS IoT Device Management - IOT330 - re:Invent 2017
NEW LAUNCH! AWS IoT Device Management - IOT330 - re:Invent 2017NEW LAUNCH! AWS IoT Device Management - IOT330 - re:Invent 2017
NEW LAUNCH! AWS IoT Device Management - IOT330 - re:Invent 2017Amazon Web Services
 
Getting Started with AWS for Developers: Collision 2018
Getting Started with AWS for Developers: Collision 2018Getting Started with AWS for Developers: Collision 2018
Getting Started with AWS for Developers: Collision 2018Amazon Web Services
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideAmazon Web Services
 
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019AWS Summits
 
What's New in Serverless - SRV305 - re:Invent 2017
What's New in Serverless - SRV305 - re:Invent 2017What's New in Serverless - SRV305 - re:Invent 2017
What's New in Serverless - SRV305 - re:Invent 2017Amazon Web Services
 
Containers State of the Union I AWS Dev Day 2018
Containers State of the Union I AWS Dev Day 2018Containers State of the Union I AWS Dev Day 2018
Containers State of the Union I AWS Dev Day 2018AWS Germany
 
Costruisci e distribuisci applicazioni web moderne con AWS Amplify Console
Costruisci e distribuisci applicazioni web moderne con AWS Amplify ConsoleCostruisci e distribuisci applicazioni web moderne con AWS Amplify Console
Costruisci e distribuisci applicazioni web moderne con AWS Amplify ConsoleAmazon Web Services
 
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019AWS Summits
 

Mais procurados (20)

Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
 
re:Invent 2018: AI/ML Services
re:Invent 2018: AI/ML Servicesre:Invent 2018: AI/ML Services
re:Invent 2018: AI/ML Services
 
Serverless - State of the Union
Serverless - State of the UnionServerless - State of the Union
Serverless - State of the Union
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
 
Twelve-Factor App Methodology and Modern Applications | AWS Summit Tel Aviv 2019
Twelve-Factor App Methodology and Modern Applications | AWS Summit Tel Aviv 2019Twelve-Factor App Methodology and Modern Applications | AWS Summit Tel Aviv 2019
Twelve-Factor App Methodology and Modern Applications | AWS Summit Tel Aviv 2019
 
IOT311_Customer Stories of Things, Cloud, and Analytics on AWS
IOT311_Customer Stories of Things, Cloud, and Analytics on AWSIOT311_Customer Stories of Things, Cloud, and Analytics on AWS
IOT311_Customer Stories of Things, Cloud, and Analytics on AWS
 
Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018
 
From Code to a running container | AWS Summit Tel Aviv 2019
From Code to a running container | AWS Summit Tel Aviv 2019From Code to a running container | AWS Summit Tel Aviv 2019
From Code to a running container | AWS Summit Tel Aviv 2019
 
Containers - State of the Union
Containers - State of the UnionContainers - State of the Union
Containers - State of the Union
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDK
 
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
 
Building Chatbots with Amazon Lex
Building Chatbots with Amazon LexBuilding Chatbots with Amazon Lex
Building Chatbots with Amazon Lex
 
NEW LAUNCH! AWS IoT Device Management - IOT330 - re:Invent 2017
NEW LAUNCH! AWS IoT Device Management - IOT330 - re:Invent 2017NEW LAUNCH! AWS IoT Device Management - IOT330 - re:Invent 2017
NEW LAUNCH! AWS IoT Device Management - IOT330 - re:Invent 2017
 
Getting Started with AWS for Developers: Collision 2018
Getting Started with AWS for Developers: Collision 2018Getting Started with AWS for Developers: Collision 2018
Getting Started with AWS for Developers: Collision 2018
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a Ride
 
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
 
What's New in Serverless - SRV305 - re:Invent 2017
What's New in Serverless - SRV305 - re:Invent 2017What's New in Serverless - SRV305 - re:Invent 2017
What's New in Serverless - SRV305 - re:Invent 2017
 
Containers State of the Union I AWS Dev Day 2018
Containers State of the Union I AWS Dev Day 2018Containers State of the Union I AWS Dev Day 2018
Containers State of the Union I AWS Dev Day 2018
 
Costruisci e distribuisci applicazioni web moderne con AWS Amplify Console
Costruisci e distribuisci applicazioni web moderne con AWS Amplify ConsoleCostruisci e distribuisci applicazioni web moderne con AWS Amplify Console
Costruisci e distribuisci applicazioni web moderne con AWS Amplify Console
 
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 

Semelhante a Thinking Asynchronously - ServerlessDays Istanbul - Oct 3 2019

Thinking Asynchronously Full Vesion - Utah UG
Thinking Asynchronously Full Vesion - Utah UGThinking Asynchronously Full Vesion - Utah UG
Thinking Asynchronously Full Vesion - Utah UGEric Johnson
 
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
 
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS SummitThirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS SummitAmazon Web Services
 
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Amazon Web Services
 
Building APIs with Amazon API Gateway
Building APIs with Amazon API GatewayBuilding APIs with Amazon API Gateway
Building APIs with Amazon API GatewayAmazon Web Services
 
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...Amazon Web Services
 
Build a Serverless Web Application
Build a Serverless Web ApplicationBuild a Serverless Web Application
Build a Serverless Web ApplicationAmazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...Amazon Web Services Japan
 
Building serverless enterprise applications - SRV315 - Toronto AWS Summit
Building serverless enterprise applications - SRV315 - Toronto AWS SummitBuilding serverless enterprise applications - SRV315 - Toronto AWS Summit
Building serverless enterprise applications - SRV315 - Toronto AWS SummitAmazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAWS Summits
 
Serverless applications with AWS
Serverless applications with AWSServerless applications with AWS
Serverless applications with AWSjavier ramirez
 
Modern Applications Development on AWS
Modern Applications Development on AWSModern Applications Development on AWS
Modern Applications Development on AWSBoaz Ziniman
 
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS SummitBuild Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS SummitAmazon Web Services
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and youJames Beswick
 
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...Amazon Web Services
 
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...AWS Summits
 
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...Amazon Web Services
 
Developing on AWS - Crypto Startup
Developing on AWS - Crypto StartupDeveloping on AWS - Crypto Startup
Developing on AWS - Crypto StartupAmazon Web Services
 
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS SummitBuild Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS SummitAmazon Web Services
 

Semelhante a Thinking Asynchronously - ServerlessDays Istanbul - Oct 3 2019 (20)

Thinking Asynchronously Full Vesion - Utah UG
Thinking Asynchronously Full Vesion - Utah UGThinking Asynchronously Full Vesion - Utah UG
Thinking Asynchronously Full Vesion - Utah UG
 
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
 
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS SummitThirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
 
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
 
Building APIs with Amazon API Gateway
Building APIs with Amazon API GatewayBuilding APIs with Amazon API Gateway
Building APIs with Amazon API Gateway
 
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...
 
Build a Serverless Web Application
Build a Serverless Web ApplicationBuild a Serverless Web Application
Build a Serverless Web Application
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
 
Building serverless enterprise applications - SRV315 - Toronto AWS Summit
Building serverless enterprise applications - SRV315 - Toronto AWS SummitBuilding serverless enterprise applications - SRV315 - Toronto AWS Summit
Building serverless enterprise applications - SRV315 - Toronto AWS Summit
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Serverless applications with AWS
Serverless applications with AWSServerless applications with AWS
Serverless applications with AWS
 
Modern Applications Development on AWS
Modern Applications Development on AWSModern Applications Development on AWS
Modern Applications Development on AWS
 
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS SummitBuild Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS Summit
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and you
 
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
 
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
 
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
 
Developing on AWS - Crypto Startup
Developing on AWS - Crypto StartupDeveloping on AWS - Crypto Startup
Developing on AWS - Crypto Startup
 
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS SummitBuild Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
 

Último

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Thinking Asynchronously - ServerlessDays Istanbul - Oct 3 2019

  • 1. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Eric Johnson @edjgeek Asenkron Düşünme /serverless/DAYS Senior Developer Advocate - Serverless ISTANBUL 2019 Background Image by skeeze from Pixabay Unicorn image by https://istanbul.serverlessdays.io/ Thinking Asynchronously
  • 2. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Ben kimim? • Sr. Geliştirici ‘Avukatı’ — Sunucusuz, AWS • Sunucusuz/Takım/ Otomasyon Geek • Yazılım Mimarı/Çözüm Mimarı • Kocası – Brigitte • Noah, Jake, Owen Sophie Anne & Gracie Mae'ın babası • Müzik aşığı • Pizza/Diyet Dr. Pepper fanatik
  • 3. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Who am I? • Sr. Developer Advocate – Serverless, AWS • Serverless / Tooling / Automation Geek • Software Architect / Solutions Architect • Husband to Brigitte • Father to Noah, Jake, Owen Sophie Anne, & Gracie Mae • Music lover • Pizza / Diet Dr. Pepper fanatic
  • 4. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bugün neden buradayız?
  • 5. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Synchronous vs. Asynchronous
  • 6. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2. Lambda function(s) invoked SNS topic 1. Data published to a topic Data Amazon SNS + Lambda Simple, flexible, fully managed pub/sub messaging and mobile push notification service for high throughput, highly reliable message delivery Messages are published to a topic Topics can have multiple subscribers (fanout) Messages can be filtered and only sent to certain subscribers Lambda function Lambda function
  • 7. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2. Lambda function invoked based on rule Amazon EventBridge 1. Data published to an event bus Data Amazon EventBridge + Lambda Serverless event bus that allows easy connection between applications, AWS services, and third-party SaaS applications Easily consume events from supported third-party SaaS applications Define custom buses or use default bus Dispatch to 15 AWS services Generate custom events from your application Lambda function
  • 8. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1. Message inserted into to a queue Message Amazon SQS3. SQS removes message from queue on successful response from function 2. Lambda function invoked Amazon SQS + Lambda Simple, flexible, fully managed message queuing service for reliably and continuously exchanging any volume of messages from anywhere Processed in batches At least once delivery Visibility timeout allows for handling of failures during processingLambda function
  • 9. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2. Lambda polls stream Amazon Kinesis Stream 1. Data published to a stream 3. Kinesis returns stream data Data Amazon Kinesis Streams + Lambda Fully managed, highly scalable service for collecting and processing real-time data streams for analytics and machine learning Stream consists of shards with a fixed amount of capacity and throughput Lambda receives batches (and potentially batches of batches) Different applications can consume the same stream Lambda function
  • 10. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Common patterns
  • 11. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Common AWS Lambda use cases Web Apps Backends Data Processing Chatbots Amazon Alexa IT Automation • Static websites • Complex web apps • Packages for Flask and Express • Apps & services • Mobile • IoT • Real time • MapReduce • Batch • Powering chatbot logic • Powering voice-enabled apps • Alexa Skills Kit • Policy engines • Extending AWS services • Infrastructure management
  • 12. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Common AWS Lambda use cases Web Apps • Static websites • Complex web apps • Packages for Flask and Express We are focusing on web apps today
  • 13. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A common serverless web application AWS Cloud Amazon API Gateway Amazon DynamoDB Lambda function(s) Host BucketAmazon CloudFront Amazon Cognito User
  • 14. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The “big Lambda function” approach AWS Cloud Amazon API Gateway Amazon DynamoDB Lambda function User
  • 15. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The “big Lambda function” approach AWS Cloud Amazon API Gateway Amazon DynamoDB Lambda function User One Lambda function handles all business logic • Ok for small applications • Can get bloated as logic gets complex
  • 16. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The “many Lambda functions” approach AWS Cloud Amazon DynamoDB User Amazon API Gateway
  • 17. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The “many Lambda functions” approach AWS Cloud Amazon DynamoDB User Amazon API Gateway Multiple Lambda functions • Single responsibility • Easier to manage • Logical splits • Domain objects • Resource • Methods
  • 18. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What happens when the functions need to talk? AWS Cloud Amazon API Gateway Amazon DynamoDB User Communication between functions
  • 19. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Coupling is baaaad AWS Cloud Amazon API Gateway Amazon DynamoDB User Communication between functions
  • 20. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Translation Demo Synchronous “big Lambda function” example
  • 21. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event data { "data":”Hello, welcome to my translation demo.", "culture":[”fr-FR","tr-TR”,“de-DE”,”fr-CA”] }
  • 22. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Synchronous demo AWS Cloud Amazon API Gateway Lambda function Bucket Amazon Cognito User Amazon Translate Each culture is sent to Amazon Translate as a separate request1
  • 23. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Synchronous demo AWS Cloud Amazon API Gateway Lambda function Bucket Amazon Cognito User Amazon Polly Amazon Translate Each translation is sent to Amazon Polly for audio rendering 2
  • 24. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Synchronous demo AWS Cloud Amazon API Gateway Lambda function Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket Audio files are save to an Amazon S3 bucket3
  • 25. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Synchronous demo AWS Cloud Amazon API Gateway Amazon DynamoDB Lambda function Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket All records are written to Amazon DynamoDB4
  • 26. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Resulting Data DynamoDB S3
  • 27. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Show me the demo!! http://bit.ly/serv-translate
  • 28. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Translation Demo Asynchronous “many Lambda functions” example
  • 29. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous options Amazon EventBridge Amazon Simple Queue Service Amazon Simple Notification Service Amazon Kinesis Data Streams
  • 30. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Our demo will use these asynchronous options Amazon EventBridge Amazon Kinesis Data Streams
  • 31. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Our demo will use these asynchronous options Amazon EventBridge Amazon DynamoDB Streams DynamoDB uses Kinesis under the hood for streams
  • 32. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Our demo will use these asynchronous options Amazon EventBridge Amazon DynamoDB Streams Amazon Simple Storage Service (S3) We will also use an S3 bucket event
  • 33. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Original request is written to Amazon DynamoDB1
  • 34. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Stream Reader EventBridge DynamoDB Streams then triggers a stream reader Lambda function which parses the translation requests 2
  • 35. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Amazon TranslateStream Reader EventBridge Translate The translations are then saved to DynamoDB as separate records 3
  • 36. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket Stream Reader EventBridge Audio Translate Each translation triggers the Stream Reader function which creates an audio request and sends it to Amazon Polly who saves the resulting file to an S3 bucket 4
  • 37. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket Stream Reader EventBridge Finalize Audio Translate The bucket triggers a Lambda function that adds an ACL to the file and saves the record to DynamoDB 5
  • 38. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. http://bit.ly/serv-translate Show me the demo!!
  • 39. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo upgrade AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket Stream Reader EventBridge Finalize Audio Translate What if I wanted to add another step?
  • 40. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo upgrade AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket Stream Reader EventBridge Finalize Audio Translate For example: Sentiment analysis with Amazon Comprehend
  • 41. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo upgrade AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket Stream Reader EventBridge Finalize Audio Translate
  • 42. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous demo upgrade AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket Stream Reader Finalize Audio TranslateEventBridge Amazon ComprehendSentiment Options • Add a new target to an existing rule • Create a separate event for Comprehension in EventBridge
  • 43. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What we have built AWS Cloud Amazon API Gateway Amazon DynamoDB Endpoint Bucket Amazon Cognito User Amazon Polly Amazon Translate Audio Bucket Stream Reader Finalize Audio TranslateEventBridge Amazon ComprehendSentiment
  • 44. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Questions? https://pixabay.com/illustrations/questions-font-who-what-how-why-2245264/
  • 45. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Eric Johnson @edjgeek Image Source: https://pixabay.com/illustrations/thank-you-polaroid-letters-2490552/