SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thirty Serverless Architectures
in 30 Minutes
C h r i s M u n n s – S e n i o r D e v e l o p e r A d v o c a t e - S e r v e r l e s s
N o v e m b e r 2 7 , 2 0 1 7
S R V 2 1 3
AWS re:Invent
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
About me:
Chris Munns - munns@amazon.com, @chrismunns
• Senior Developer Advocate—Serverless
• New Yorker
• Previously:
• AWS Business Development Manager – DevOps, July ’15 - Feb ‘17
• AWS Solutions Architect Nov, 2011 - Dec 2014
• Formerly on operations teams @Etsy and @Meetup
• Little time at a hedge fund, Xerox, and a few other startups
• Rochester Institute of Technology: Applied Networking and Systems
Administration ’05
• Internet infrastructure geek
https://secure.flickr.com/photos/mgifford/4525333972
Why are we
here today?
Services (anything)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Event source Function
Node.js
Python
Java
C#
Serverless applications
Let’s
https://secure.flickr.com/photos/stevendepolo/5749192025/!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
S3
bucket
object
Lambda
function
1. File put into bucket
2. Lambda invoked
Lambda
function
2. Lambda invoked
SNS
Topic
1. Data published to a topic
Data
1. Lambda directly invoked
via invoke API
SDK clients
Lambda
function
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda
function
2. Lambda@edge function
invoked
1. HTTP/S request made to
CloudFront based domain
HTTP
request
Amazon
CloudFront
Lambda
function
2+. Lambda
function(s) invoked
1. Step Functions
workflow is executed
Lambda
function
Lambda
function
AWS Step
Functions
Event
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda
function
2. Lambda
function invoked
1. API call made
against API Gateway
API clients
Amazon API
Gateway
Lambda
function
Lambda
function
2. API call made directly
against backing AWS service
API clients
Amazon API
Gateway
API clients
Amazon
S3
Amazon
Kinesis
Amazon
DynamoDB
etc..
2. Step Functions
workflow is executed
1. API call made
against API Gateway
Amazon API
Gateway
API clients
AWS Step
Functions
1. API call made
against API Gateway
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda
function
2. Lambda invoked via rule
1. Error message gets sent
back to SES on delivery
attempt
Amazon
SES
Email failure
notification
Lambda
function
2. Message sent to SNS
SNS
Topic
1. An Auto Scaling event
occurs triggering a lifecycle
hook
Auto Scaling
3. Lambda invoked
Lambda
function
2. Lambda invoked
per matching trigger
1. User performs
action with trigger set
Amazon
Cognito
Users
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda
function
2. Lambda polls
stream
Amazon
Kinesis
Stream
1. Data published to a
stream
3. Kinesis returns
stream data
Data
Data
Amazon
Kinesis
Analytics
Lambda
function
SQL Query
Amazon
Kinesis
Stream /
Firehose
Amazon
Kinesis
Stream /
Firehose
Lambda
function
1. Data published to a
stream
2. Stream passes to
Kinesis Analytics
3. Lambda invoked to
pre-process data
4. SQL query run on
processed data
5. Analytics output
sent back to
Stream/Firehose 6. Lambda invoked
per poll model to
the left
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda
function
1. Deployment
event is sent to
SNS Topic
AWS
CodeDeploy
Lambda
function
2. CodePipeline executed
Application
Code
1. Code
committed
3. Lambda function
invoked via stage action
2. Lambda invoked
via SNS
configuration
SNS
Topic
Lambda
function
3. Lambda invoked
Application
Code
1. Code repository event
AWS
CodeCommit
2. Event Trigger tripped
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
"AMIGetter": {
"Type": "Custom::AMIGetter",
"Properties": {
"ServiceToken": { "Fn::Join": [ "", [
"arn:aws:lambda:", { "Ref": "AWS::Region" },
":", { "Ref": "AWS::AccountId" }, ":function:",
"AMIGetter" ] ] },
….
Lambda
function
2. Lambda invoked
1. Custom resource
executed
AWS CloudFormation
Template
Lambda
function
2. S3 publishes
event to Lambda
1. AWS API calls logged
to an object in S3
AWS
CloudTrail
S3
bucket
3. Lambda invoked,
processes object in
S3
Lambda
function
2. Change sent to SNS
Topic
1. AWS resource changed
Amazon
Config
SNS
Topic
3. Lambda invoked
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda
function
2. Lambda invoked via
rule
Change
Event
1. AWS resource changed
or periodic execution
AWS Config
Rule
Lambda
function
2. Lambda invoked via
rule
Service
Event
1. Service Event or CWE
Bus API call
CloudWatch
Events
(event-based)
Lambda
function
1. Scheduled time
occurs
CloudWatch
Events
(time-based)
2. Lambda invoked
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda
function
3. Lambda invoked
Metric Data
1. Metric data collected
by CloudWatch
Amazon
CloudWatch
2. Alarm threshold
breached
Lambda
function
3. Lambda invoked
Logs
1. Logs collected by
CloudWatch Logs
Amazon
CloudWatch
2. Logs passed on
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1. Items inserted/
updated/deleted
Lambda
function
3. Lambda polls
stream
Amazon
Kinesis
Stream
4. Kinesis
returns
stream data
Items
DynamoDB
Table
2. Event published
to Kinesis Stream
Lambda
function
3. Lambda invoked
1. Query executed
Amazon
Aurora - MySQL
SQL Query
2. Stored
procedure called
Lambda
function
3. Lambda invoked
1. Amazon Redshift
Event occurs
Amazon
Redshift
SNS
Topic
2. Event sent to SNS
Topic
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2. Lambda invoked
1. Chatbot conversation
needs “fulfillment”
Lambda
function
Amazon
Lex
Chatbot
Lambda
function
2. Lambda invoked
1. Alexa, what’s today’s
weather?
Alexa
skill
Alexa-compatible
device
Lambda
function
2. Lambda invoked
1. IoT device sends
data
IoT
device
AWS IoT
FIN, ACK
• From full-fledged application backends to “glue”
functions attached to operational tasks
• Removes the need to run hosts for small scripts such as
cron jobs and small web services, with many benefits:
• Reduced cost
• Reduced maintenance overhead
• No capacity planning needed for potential spikes in usage
• Security model that allows for finely scoped access and
permissions
• Use AWS SAM (Serverless Application Models) to deploy!
• Can get started right in the console or via AWS CodeStar!
There are a lot of different use-cases for AWS Lambda!
aws.amazon.com/serverless
Chris Munns
munns@amazon.com
@chrismunnshttps://www.flickr.com/photos/theredproject/3302110152/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
R e m e m b e r t o r e v i e w t h i s s e s s i o n !
S R V 2 1 3

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

WIN302-Deep Dive on Active Directory From One to Many AWS Regions
WIN302-Deep Dive on Active Directory From One to Many AWS RegionsWIN302-Deep Dive on Active Directory From One to Many AWS Regions
WIN302-Deep Dive on Active Directory From One to Many AWS Regions
 
ENT324-Automating and Auditing Cloud Governance and Compliance in Multi-Accou...
ENT324-Automating and Auditing Cloud Governance and Compliance in Multi-Accou...ENT324-Automating and Auditing Cloud Governance and Compliance in Multi-Accou...
ENT324-Automating and Auditing Cloud Governance and Compliance in Multi-Accou...
 
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDSDAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS
 
SID201_IAM for Enterprises How Vanguard strikes the Balance Between Agility, ...
SID201_IAM for Enterprises How Vanguard strikes the Balance Between Agility, ...SID201_IAM for Enterprises How Vanguard strikes the Balance Between Agility, ...
SID201_IAM for Enterprises How Vanguard strikes the Balance Between Agility, ...
 
Design, Build, and Modernize Your Web Applications with AWS
 Design, Build, and Modernize Your Web Applications with AWS Design, Build, and Modernize Your Web Applications with AWS
Design, Build, and Modernize Your Web Applications with AWS
 
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdfWPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
 
More Containers Less Operations
More Containers Less OperationsMore Containers Less Operations
More Containers Less Operations
 
SecOps 2021 Today: Using AWS Services to Deliver SecOps - SID304 - re:Invent ...
SecOps 2021 Today: Using AWS Services to Deliver SecOps - SID304 - re:Invent ...SecOps 2021 Today: Using AWS Services to Deliver SecOps - SID304 - re:Invent ...
SecOps 2021 Today: Using AWS Services to Deliver SecOps - SID304 - re:Invent ...
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWS
 
SID402_An AWS Security Odyssey
SID402_An AWS Security OdysseySID402_An AWS Security Odyssey
SID402_An AWS Security Odyssey
 
An Introduction to AI Services on AWS - Web Summit Lisbon
An Introduction to AI Services on AWS -  Web Summit LisbonAn Introduction to AI Services on AWS -  Web Summit Lisbon
An Introduction to AI Services on AWS - Web Summit Lisbon
 
ALX401-Advanced Alexa Skill Building Conversation and Memory
ALX401-Advanced Alexa Skill Building Conversation and MemoryALX401-Advanced Alexa Skill Building Conversation and Memory
ALX401-Advanced Alexa Skill Building Conversation and Memory
 
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECSCON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
 
WIN302-Deep Dive on Active Directory From One to Many AWS Regions.pdf
WIN302-Deep Dive on Active Directory From One to Many AWS Regions.pdfWIN302-Deep Dive on Active Directory From One to Many AWS Regions.pdf
WIN302-Deep Dive on Active Directory From One to Many AWS Regions.pdf
 
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
 
SRV403_Serverless Authentication and Authorization
SRV403_Serverless Authentication and AuthorizationSRV403_Serverless Authentication and Authorization
SRV403_Serverless Authentication and Authorization
 
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...
 
Soup to Nuts: Identity Federation for AWS
Soup to Nuts: Identity Federation for AWSSoup to Nuts: Identity Federation for AWS
Soup to Nuts: Identity Federation for AWS
 
CON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized ServicesCON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized Services
 
IOT308-One Message to a Million Things Done in 60 seconds with AWS IoT
IOT308-One Message to a Million Things Done in 60 seconds with AWS IoTIOT308-One Message to a Million Things Done in 60 seconds with AWS IoT
IOT308-One Message to a Million Things Done in 60 seconds with AWS IoT
 

Semelhante a SRV213-Thirty Serverless Architectures in 30 Minutes

Serverless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practicesServerless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practices
saifam
 

Semelhante a SRV213-Thirty Serverless Architectures in 30 Minutes (20)

Thirty Serverless Architectures in 30 Minutes - SRV325 - Chicago AWS Summit
Thirty Serverless Architectures in 30 Minutes - SRV325 - Chicago AWS SummitThirty Serverless Architectures in 30 Minutes - SRV325 - Chicago AWS Summit
Thirty Serverless Architectures in 30 Minutes - SRV325 - Chicago AWS Summit
 
AWS Summit Singapore - You Don't Need a Server For That!
AWS Summit Singapore - You Don't Need a Server For That!AWS Summit Singapore - You Don't Need a Server For That!
AWS Summit Singapore - You Don't Need a Server For That!
 
AWS Summit Singapore Webinar Edition | You Don't Need a Server For That!
AWS Summit Singapore Webinar Edition | You Don't Need a Server For That!AWS Summit Singapore Webinar Edition | You Don't Need a Server For That!
AWS Summit Singapore Webinar Edition | You Don't Need a Server For That!
 
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
 
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...
 
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
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWS
 
Scalable serverless architectures using event-driven design - MAD301 - Atlant...
Scalable serverless architectures using event-driven design - MAD301 - Atlant...Scalable serverless architectures using event-driven design - MAD301 - Atlant...
Scalable serverless architectures using event-driven design - MAD301 - Atlant...
 
Getting Started with AWS Lambda Serverless Computing
Getting Started with AWS Lambda Serverless ComputingGetting Started with AWS Lambda Serverless Computing
Getting Started with AWS Lambda Serverless Computing
 
The Future of Enterprise Applications is Serverless
The Future of Enterprise Applications is ServerlessThe Future of Enterprise Applications is Serverless
The Future of Enterprise Applications is Serverless
 
Scalable serverless architectures using event-driven design - MAD308 - New Yo...
Scalable serverless architectures using event-driven design - MAD308 - New Yo...Scalable serverless architectures using event-driven design - MAD308 - New Yo...
Scalable serverless architectures using event-driven design - MAD308 - New Yo...
 
CMP211_Getting Started with Serverless Architectures
CMP211_Getting Started with Serverless ArchitecturesCMP211_Getting Started with Serverless Architectures
CMP211_Getting Started with Serverless Architectures
 
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
 
Build Enterprise-Grade Serverless Apps
Build Enterprise-Grade Serverless Apps Build Enterprise-Grade Serverless Apps
Build Enterprise-Grade Serverless Apps
 
Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda
 
Building API Driven Microservices
Building API Driven MicroservicesBuilding API Driven Microservices
Building API Driven Microservices
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
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
 
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
 
Serverless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practicesServerless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practices
 

Mais de Amazon 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 AWS
Amazon 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 Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon 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
 

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
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
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
 

SRV213-Thirty Serverless Architectures in 30 Minutes

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thirty Serverless Architectures in 30 Minutes C h r i s M u n n s – S e n i o r D e v e l o p e r A d v o c a t e - S e r v e r l e s s N o v e m b e r 2 7 , 2 0 1 7 S R V 2 1 3 AWS re:Invent
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. About me: Chris Munns - munns@amazon.com, @chrismunns • Senior Developer Advocate—Serverless • New Yorker • Previously: • AWS Business Development Manager – DevOps, July ’15 - Feb ‘17 • AWS Solutions Architect Nov, 2011 - Dec 2014 • Formerly on operations teams @Etsy and @Meetup • Little time at a hedge fund, Xerox, and a few other startups • Rochester Institute of Technology: Applied Networking and Systems Administration ’05 • Internet infrastructure geek
  • 4. Services (anything) Changes in data state Requests to endpoints Changes in resource state Event source Function Node.js Python Java C# Serverless applications
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. S3 bucket object Lambda function 1. File put into bucket 2. Lambda invoked Lambda function 2. Lambda invoked SNS Topic 1. Data published to a topic Data 1. Lambda directly invoked via invoke API SDK clients Lambda function
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda function 2. Lambda@edge function invoked 1. HTTP/S request made to CloudFront based domain HTTP request Amazon CloudFront Lambda function 2+. Lambda function(s) invoked 1. Step Functions workflow is executed Lambda function Lambda function AWS Step Functions Event
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda function 2. Lambda function invoked 1. API call made against API Gateway API clients Amazon API Gateway Lambda function Lambda function 2. API call made directly against backing AWS service API clients Amazon API Gateway API clients Amazon S3 Amazon Kinesis Amazon DynamoDB etc.. 2. Step Functions workflow is executed 1. API call made against API Gateway Amazon API Gateway API clients AWS Step Functions 1. API call made against API Gateway
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda function 2. Lambda invoked via rule 1. Error message gets sent back to SES on delivery attempt Amazon SES Email failure notification Lambda function 2. Message sent to SNS SNS Topic 1. An Auto Scaling event occurs triggering a lifecycle hook Auto Scaling 3. Lambda invoked Lambda function 2. Lambda invoked per matching trigger 1. User performs action with trigger set Amazon Cognito Users
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda function 2. Lambda polls stream Amazon Kinesis Stream 1. Data published to a stream 3. Kinesis returns stream data Data Data Amazon Kinesis Analytics Lambda function SQL Query Amazon Kinesis Stream / Firehose Amazon Kinesis Stream / Firehose Lambda function 1. Data published to a stream 2. Stream passes to Kinesis Analytics 3. Lambda invoked to pre-process data 4. SQL query run on processed data 5. Analytics output sent back to Stream/Firehose 6. Lambda invoked per poll model to the left
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda function 1. Deployment event is sent to SNS Topic AWS CodeDeploy Lambda function 2. CodePipeline executed Application Code 1. Code committed 3. Lambda function invoked via stage action 2. Lambda invoked via SNS configuration SNS Topic Lambda function 3. Lambda invoked Application Code 1. Code repository event AWS CodeCommit 2. Event Trigger tripped
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. "AMIGetter": { "Type": "Custom::AMIGetter", "Properties": { "ServiceToken": { "Fn::Join": [ "", [ "arn:aws:lambda:", { "Ref": "AWS::Region" }, ":", { "Ref": "AWS::AccountId" }, ":function:", "AMIGetter" ] ] }, …. Lambda function 2. Lambda invoked 1. Custom resource executed AWS CloudFormation Template Lambda function 2. S3 publishes event to Lambda 1. AWS API calls logged to an object in S3 AWS CloudTrail S3 bucket 3. Lambda invoked, processes object in S3 Lambda function 2. Change sent to SNS Topic 1. AWS resource changed Amazon Config SNS Topic 3. Lambda invoked
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda function 2. Lambda invoked via rule Change Event 1. AWS resource changed or periodic execution AWS Config Rule Lambda function 2. Lambda invoked via rule Service Event 1. Service Event or CWE Bus API call CloudWatch Events (event-based) Lambda function 1. Scheduled time occurs CloudWatch Events (time-based) 2. Lambda invoked
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda function 3. Lambda invoked Metric Data 1. Metric data collected by CloudWatch Amazon CloudWatch 2. Alarm threshold breached Lambda function 3. Lambda invoked Logs 1. Logs collected by CloudWatch Logs Amazon CloudWatch 2. Logs passed on
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1. Items inserted/ updated/deleted Lambda function 3. Lambda polls stream Amazon Kinesis Stream 4. Kinesis returns stream data Items DynamoDB Table 2. Event published to Kinesis Stream Lambda function 3. Lambda invoked 1. Query executed Amazon Aurora - MySQL SQL Query 2. Stored procedure called Lambda function 3. Lambda invoked 1. Amazon Redshift Event occurs Amazon Redshift SNS Topic 2. Event sent to SNS Topic
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2. Lambda invoked 1. Chatbot conversation needs “fulfillment” Lambda function Amazon Lex Chatbot Lambda function 2. Lambda invoked 1. Alexa, what’s today’s weather? Alexa skill Alexa-compatible device Lambda function 2. Lambda invoked 1. IoT device sends data IoT device AWS IoT
  • 17. FIN, ACK • From full-fledged application backends to “glue” functions attached to operational tasks • Removes the need to run hosts for small scripts such as cron jobs and small web services, with many benefits: • Reduced cost • Reduced maintenance overhead • No capacity planning needed for potential spikes in usage • Security model that allows for finely scoped access and permissions • Use AWS SAM (Serverless Application Models) to deploy! • Can get started right in the console or via AWS CodeStar! There are a lot of different use-cases for AWS Lambda!
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! R e m e m b e r t o r e v i e w t h i s s e s s i o n ! S R V 2 1 3