SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Twelve-factor app methodology
and modern applications
Uri Segev
Principal Solutions Architect
Amazon Web Services
D E V 3 0 8
Oren Reuveni
Solutions Architect
Amazon Web Services
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
• What is the “12 Factor app”?
• What do we mean by “Serverless”?
• 12 Factor in a serverless app
• Demo
• Takeaways
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The “12 Factor” model & serverless applications
• Methodology for building modern applications
• A popular best practice for both developers and operations engineers
• Many of the 12 Factor guidelines align directly with best practices for
serverless applications and are improved upon given the nature of
AWS Lambda, Amazon API Gateway, and other AWS services
• However, some of the 12 Factor guidelines don’t directly align with
serverless applications or are interpreted very differently
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is serverless?
No infrastructure provisioning,
no management
Automatic scaling
Pay for value Highly available and secure
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda
Run code without provisioning or managing servers
Virtually any type of application or backend service
Trigger from other AWS services or call it directly
from any web or mobile app
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless applications
Services (anything)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Event source Function
Node.js
Python
Java
C#
Go
Ruby
Runtime API
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS
Lambda
AWS
Fargate
COMPUTE
DATA STORES
INTEGRATION
Amazon Aurora
Serverless
Amazon
S3
Amazon
DynamoDB
Amazon
API Gateway
Amazon
SNS
Amazon
SQS
AWS
Step Functions
AWS
AppSync
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The 12 Factors:
Let’s explore how the 12 Factors apply to a serverless application:
1. Codebase
2. Dependencies
3. Config
4. Backing services
5. Build, release, run
6. Process
7. Port Binding
8. Concurrency
9. Disposability
10. Dev/prod parity
11. Logs
12. Admin processes
https://12factor.net
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1. Codebase
12Factor: “One codebase tracked in revision control, many deploys”
Serverless Apps: All code should be stored in revision control (a
development best practice).
Same repository should be used for all environments deployed to.
The bounds of an “application” differ in serverless terms:
• If events are shared (i.e., a common Amazon API Gateway) then
Lambda function code for those events should be put in the same
repository
• Otherwise break “services” into their own repositories
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2. Dependencies
12Factor: “Explicitly declare and isolate dependencies”
Serverless Apps: Code that is used by multiple functions should be
packaged into its own library. Include those libs inside your deployment
package or into a AWS Lambda Layer.
Node.js, Python, Ruby
• Use npm/pip to
install libraries
• All dependencies
must be at root
level
• .zip file consisting of
your code and any
dependencies
Java
• Either .zip file with all
code/dependencies,
or standalone .jar
• Use Maven / Eclipse
IDE plugins
• Compiled class &
resource files at root
level, required jars in
/lib directory
C# (.NET Core)
• Either .zip file with
all code /
dependencies, or a
standalone .dll
• Use NuGet /
VisualStudio
plugins
• All assemblies (.dll)
at root level
Go
• .zip file consisting
of your Go binary
and any
dependencies
• Use “go get” to
install
dependencies
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda Layers
Lets functions easily share code: Upload layer
once, reference within any function
Layer can be anything: dependencies, training
data, configuration files, etc
Promote separation of responsibilities, lets
developers iterate faster on writing business logic
Built in support for secure sharing by ecosystem
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
3. Config
12Factor: “Store config in the environment”
Serverless Apps: Many ways to do this in serverless applications:
• Lambda environment variables
• API Gateway stage variables
• AWS Systems Manager Parameter Store
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
4. Backing services
12Factor: “Treat backing services as attached resources”
Serverless Apps: No differences. Resources that Lambda functions
connect to, such as databases, should have their endpoints and access
credentials made available via config resources or IAM policies
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
5. Build, Release, Run
12Factor: “Strictly separate build and run stages”
Serverless Apps: No differences. Development best practices such as
Continuous Integration and Continuous Delivery should be followed.
• Use AWS CodeBuild and AWS CodePipeline to support this:
AWS CodeBuild AWS CodePipeline
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CI/CD for serverless applications
• Source code repository hosts SAM template
• CodePipeline per application
• CodeBuild generates a deployable artifact
• CodePipeline/CodeDeploy deploys to
different environments, with the right
config
CodeBuildCodeCommit CodePipeline
CloudFormation
API Gateway
Lambda
Dev account
Step Functions
DynamoDBCodeDeploy
CloudFormation
API Gateway
Lambda
Test account
Step Functions
DynamoDB
CodeDeploy
CloudFormation
API Gateway
Lambda
Prod account
Step Functions
DynamoDB
CodeDeploy
Tools accountCode account
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
6. Process
12Factor: “Execute the app as one or more stateless processes”
Serverless Apps: This is inherent in how Lambda is designed already:
• Lambda Functions should be treated as stateless components
• There is no promise of execution environment re-use between function
invocations
• Data that needs to be kept should be stored in a stateful service such
as a database or cache
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
7. Port binding
12Factor: “Export services via port binding”
Serverless Apps: In Lambda/serverless applications this factor doesn’t
apply the same due to a difference in how Lambda Functions are
accessed:
• Instead of a “port” Lambda functions are invoked by an event
• Lambda functions are invoked in 3 ways: synchronously,
asynchronously, and via stream
• Instead of having one function support multiple invocation sources,
create independent functions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda execution model
Synchronous (push)
AWS Lambda
function
/order
Asynchronous (event)
AWS Lambda
function
reqs
Poll-based
changes
AWS Lambda
service
Function
Amazon
API Gateway
Amazon
SNS
Amazon
S3
Amazon
DynamoDB
Amazon
Kinesis
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
8. Concurrency
12Factor: “Scale out via the process model”
Serverless Apps: Doesn’t apply. Lambda functions will scale automatically
based on load.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
9. Disposability
12Factor: “Maximize robustness with fast startup and graceful shutdown”
Serverless Apps:
Shutdown doesn’t apply as Lambda functions and their invocation are
tied directly to incoming events.
Speed at startup does matter:
• Minimize package size to necessities
• Do one thing – smaller package size
• Reuse – initializing clients/instances outside the handler
• Choose the right environment size for optimal operation
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
10. Dev/prod parity
12Factor: “Keep dev, staging, and production as similar as possible”
Serverless Apps: This can be made incredibly easy with serverless
applications by:
• Making use of environment/stage variables or Parameter Store for
configuration information, backend resources, etc
• Using Serverless Application Models (SAM) to deploy your application
• Having a CI/CD process and tooling that supports multiple
environments or accounts
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
11. Logs
12Factor: “Treat logs as event streams”
Serverless Apps: Logging (as well as Metric collection) are considered a
“universal right” in Lambda:
• Console output automatically collected and sent to Amazon
CloudWatch Logs
• Metrics for Lambda and API Gateway for several key stats are
automatically collected and sent to CloudWatch
• You can easily send more using the CloudWatch SDK
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
12. Admin processes
12Factor: “Run admin/management tasks as one-off processes”
Serverless Apps: Doesn’t apply to Lambda since you already limit your
functions based on use case.
True administrative tasks would occur via their own Lambda Functions.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Serverless Application Model (SAM)
• AWS CloudFormation extension optimized for
serverless
• Special serverless resource types:
• Functions, APIs, SimpleTables and Layers
• CLI tool for local development, debugging,
testing, deploying, and monitoring of
serverless applications
https://aws.amazon.com/serverless/sam
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Takeaways
• The 12 factor app methodology can assist with designing modern
applications properly
• Many factors are already built into serverless applications
• Serverless applications assist with focusing on our core business
https://aws.amazon.com/serverless/
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Uri Segev
Oren Reuveni
http://bit.ly/2SFkTzT

Mais conteúdo relacionado

Mais procurados

Resiliency and Availability Design Patterns for the Cloud
Resiliency and Availability Design Patterns for the CloudResiliency and Availability Design Patterns for the Cloud
Resiliency and Availability Design Patterns for the CloudAmazon Web Services
 
Creare e gestire Data Lake e Data Warehouses
Creare e gestire Data Lake e Data WarehousesCreare e gestire Data Lake e Data Warehouses
Creare e gestire Data Lake e Data WarehousesAmazon Web Services
 
Architecting Security & Governance Across Your AWS Landing Zone
Architecting Security & Governance Across Your AWS Landing ZoneArchitecting Security & Governance Across Your AWS Landing Zone
Architecting Security & Governance Across Your AWS Landing ZoneAmazon Web Services
 
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdfAmazon Web Services
 
Using automation to drive continuous-compliance best practices - SEC208 - New...
Using automation to drive continuous-compliance best practices - SEC208 - New...Using automation to drive continuous-compliance best practices - SEC208 - New...
Using automation to drive continuous-compliance best practices - SEC208 - New...Amazon Web Services
 
利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統Amazon Web Services
 
Building-Serverless-Analytics-On-AWS
Building-Serverless-Analytics-On-AWSBuilding-Serverless-Analytics-On-AWS
Building-Serverless-Analytics-On-AWSAmazon Web Services
 
Preparing Your Data for Cloud Analytics & AI/ML
Preparing Your Data for Cloud Analytics & AI/MLPreparing Your Data for Cloud Analytics & AI/ML
Preparing Your Data for Cloud Analytics & AI/MLAmazon Web Services
 
Breaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container ServicesBreaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container ServicesAmazon 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
 
Architetture per l'analisi di flussi di dati in tempo reale
Architetture per l'analisi di flussi di dati in tempo realeArchitetture per l'analisi di flussi di dati in tempo reale
Architetture per l'analisi di flussi di dati in tempo realeAmazon Web Services
 
Simplify Your Front End Apps with Serverless Backend in the Cloud.
Simplify Your Front End Apps with Serverless Backend in the Cloud.Simplify Your Front End Apps with Serverless Backend in the Cloud.
Simplify Your Front End Apps with Serverless Backend in the Cloud.Amazon Web Services
 
Breaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersBreaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersAmazon Web Services
 
AWS 無伺服器開發工作坊_Matt.pdf
AWS 無伺服器開發工作坊_Matt.pdfAWS 無伺服器開發工作坊_Matt.pdf
AWS 無伺服器開發工作坊_Matt.pdfAmazon Web Services
 
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...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
 
Education : Digital transformation & AWS Foundations
Education : Digital transformation & AWS FoundationsEducation : Digital transformation & AWS Foundations
Education : Digital transformation & AWS FoundationsAmazon Web Services
 
Progetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWSProgetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWSAmazon Web Services
 

Mais procurados (19)

Resiliency and Availability Design Patterns for the Cloud
Resiliency and Availability Design Patterns for the CloudResiliency and Availability Design Patterns for the Cloud
Resiliency and Availability Design Patterns for the Cloud
 
Creare e gestire Data Lake e Data Warehouses
Creare e gestire Data Lake e Data WarehousesCreare e gestire Data Lake e Data Warehouses
Creare e gestire Data Lake e Data Warehouses
 
Architecting Security & Governance Across Your AWS Landing Zone
Architecting Security & Governance Across Your AWS Landing ZoneArchitecting Security & Governance Across Your AWS Landing Zone
Architecting Security & Governance Across Your AWS Landing Zone
 
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
 
Using automation to drive continuous-compliance best practices - SEC208 - New...
Using automation to drive continuous-compliance best practices - SEC208 - New...Using automation to drive continuous-compliance best practices - SEC208 - New...
Using automation to drive continuous-compliance best practices - SEC208 - New...
 
利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統
 
Building-Serverless-Analytics-On-AWS
Building-Serverless-Analytics-On-AWSBuilding-Serverless-Analytics-On-AWS
Building-Serverless-Analytics-On-AWS
 
Preparing Your Data for Cloud Analytics & AI/ML
Preparing Your Data for Cloud Analytics & AI/MLPreparing Your Data for Cloud Analytics & AI/ML
Preparing Your Data for Cloud Analytics & AI/ML
 
Breaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container ServicesBreaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container 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 2019
 
Architetture per l'analisi di flussi di dati in tempo reale
Architetture per l'analisi di flussi di dati in tempo realeArchitetture per l'analisi di flussi di dati in tempo reale
Architetture per l'analisi di flussi di dati in tempo reale
 
企業雲端化之旅
企業雲端化之旅企業雲端化之旅
企業雲端化之旅
 
Simplify Your Front End Apps with Serverless Backend in the Cloud.
Simplify Your Front End Apps with Serverless Backend in the Cloud.Simplify Your Front End Apps with Serverless Backend in the Cloud.
Simplify Your Front End Apps with Serverless Backend in the Cloud.
 
Breaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersBreaking the Monolith Road to Containers
Breaking the Monolith Road to Containers
 
AWS 無伺服器開發工作坊_Matt.pdf
AWS 無伺服器開發工作坊_Matt.pdfAWS 無伺服器開發工作坊_Matt.pdf
AWS 無伺服器開發工作坊_Matt.pdf
 
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
 
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 ...
 
Education : Digital transformation & AWS Foundations
Education : Digital transformation & AWS FoundationsEducation : Digital transformation & AWS Foundations
Education : Digital transformation & AWS Foundations
 
Progetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWSProgetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWS
 

Semelhante a 12 Factor App Methodology for Serverless Apps

Twelve-Factor serverless applications - MAD311 - Chicago AWS Summit
Twelve-Factor serverless applications - MAD311 - Chicago AWS SummitTwelve-Factor serverless applications - MAD311 - Chicago AWS Summit
Twelve-Factor serverless applications - MAD311 - Chicago AWS SummitAmazon Web Services
 
Twelve-Factor Serverless Applications - MAD303 - Anaheim AWS Summit
Twelve-Factor Serverless Applications - MAD303 - Anaheim AWS SummitTwelve-Factor Serverless Applications - MAD303 - Anaheim AWS Summit
Twelve-Factor Serverless Applications - MAD303 - Anaheim AWS SummitAmazon Web Services
 
Twelve-Factor serverless applications - MAD307 - New York AWS Summit
Twelve-Factor serverless applications - MAD307 - New York AWS SummitTwelve-Factor serverless applications - MAD307 - New York AWS Summit
Twelve-Factor serverless applications - MAD307 - New York AWS SummitAmazon Web Services
 
Serverless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversServerless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversAmazon Web Services
 
Build Modern Applications that Align with Twelve-Factor Methods (API303) - AW...
Build Modern Applications that Align with Twelve-Factor Methods (API303) - AW...Build Modern Applications that Align with Twelve-Factor Methods (API303) - AW...
Build Modern Applications that Align with Twelve-Factor Methods (API303) - AW...Amazon 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 2019Amazon Web Services
 
Twelve Factor Serverless Applications
Twelve Factor Serverless ApplicationsTwelve Factor Serverless Applications
Twelve Factor Serverless ApplicationsAmazon Web Services
 
Twelve-Factor Serverless Applications
Twelve-Factor Serverless ApplicationsTwelve-Factor Serverless Applications
Twelve-Factor Serverless ApplicationsAmazon Web Services
 
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...Cloud Native Day Tel Aviv
 
AWS Dev Lounge: Applying the Twelve-Factor Application Manifesto to Developin...
AWS Dev Lounge: Applying the Twelve-Factor Application Manifesto to Developin...AWS Dev Lounge: Applying the Twelve-Factor Application Manifesto to Developin...
AWS Dev Lounge: Applying the Twelve-Factor Application Manifesto to Developin...Amazon Web Services
 
JFokus 2020 - How to migrate an application to serverless
JFokus 2020 - How to migrate an application to serverlessJFokus 2020 - How to migrate an application to serverless
JFokus 2020 - How to migrate an application to serverlessMarcia Villalba
 
Introduction to Serverless on AWS
Introduction to Serverless on AWSIntroduction to Serverless on AWS
Introduction to Serverless on AWSAmazon Web Services
 
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
 
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
 
Modern Applications Development on AWS
Modern Applications Development on AWSModern Applications Development on AWS
Modern Applications Development on AWSBoaz Ziniman
 
All the Ops you need to know to Dev Serverless
All the Ops you need to know to Dev ServerlessAll the Ops you need to know to Dev Serverless
All the Ops you need to know to Dev ServerlessChris Munns
 
Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversAmazon Web Services
 
muCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsmuCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsChris Munns
 

Semelhante a 12 Factor App Methodology for Serverless Apps (20)

Twelve-Factor serverless applications - MAD311 - Chicago AWS Summit
Twelve-Factor serverless applications - MAD311 - Chicago AWS SummitTwelve-Factor serverless applications - MAD311 - Chicago AWS Summit
Twelve-Factor serverless applications - MAD311 - Chicago AWS Summit
 
Twelve-Factor Serverless Applications - MAD303 - Anaheim AWS Summit
Twelve-Factor Serverless Applications - MAD303 - Anaheim AWS SummitTwelve-Factor Serverless Applications - MAD303 - Anaheim AWS Summit
Twelve-Factor Serverless Applications - MAD303 - Anaheim AWS Summit
 
Twelve-Factor serverless applications - MAD307 - New York AWS Summit
Twelve-Factor serverless applications - MAD307 - New York AWS SummitTwelve-Factor serverless applications - MAD307 - New York AWS Summit
Twelve-Factor serverless applications - MAD307 - New York AWS Summit
 
Serverless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversServerless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about servers
 
Build Modern Applications that Align with Twelve-Factor Methods (API303) - AW...
Build Modern Applications that Align with Twelve-Factor Methods (API303) - AW...Build Modern Applications that Align with Twelve-Factor Methods (API303) - AW...
Build Modern Applications that Align with Twelve-Factor Methods (API303) - AW...
 
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
 
Twelve Factor Serverless Applications
Twelve Factor Serverless ApplicationsTwelve Factor Serverless Applications
Twelve Factor Serverless Applications
 
Twelve-Factor Serverless Applications
Twelve-Factor Serverless ApplicationsTwelve-Factor Serverless Applications
Twelve-Factor Serverless Applications
 
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
 
AWS Dev Lounge: Applying the Twelve-Factor Application Manifesto to Developin...
AWS Dev Lounge: Applying the Twelve-Factor Application Manifesto to Developin...AWS Dev Lounge: Applying the Twelve-Factor Application Manifesto to Developin...
AWS Dev Lounge: Applying the Twelve-Factor Application Manifesto to Developin...
 
JFokus 2020 - How to migrate an application to serverless
JFokus 2020 - How to migrate an application to serverlessJFokus 2020 - How to migrate an application to serverless
JFokus 2020 - How to migrate an application to serverless
 
Introduction to Serverless on AWS
Introduction to Serverless on AWSIntroduction to Serverless on AWS
Introduction to Serverless on AWS
 
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
 
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 ...
 
Modern Applications Development on AWS
Modern Applications Development on AWSModern Applications Development on AWS
Modern Applications Development on AWS
 
Serverless: State Of the Union
Serverless: State Of the UnionServerless: State Of the Union
Serverless: State Of the Union
 
Serverless - State Of the Union
Serverless - State Of the UnionServerless - State Of the Union
Serverless - State Of the Union
 
All the Ops you need to know to Dev Serverless
All the Ops you need to know to Dev ServerlessAll the Ops you need to know to Dev Serverless
All the Ops you need to know to Dev Serverless
 
Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about servers
 
muCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsmuCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless Applications
 

Mais de AWS Summits

AWS Summit Singapore 2019 | The Smart Way to Build an AI & ML Strategy for Yo...
AWS Summit Singapore 2019 | The Smart Way to Build an AI & ML Strategy for Yo...AWS Summit Singapore 2019 | The Smart Way to Build an AI & ML Strategy for Yo...
AWS Summit Singapore 2019 | The Smart Way to Build an AI & ML Strategy for Yo...AWS Summits
 
AWS Summit Singapore 2019 | Bridging Start-ups and Enterprises
AWS Summit Singapore 2019 | Bridging Start-ups and EnterprisesAWS Summit Singapore 2019 | Bridging Start-ups and Enterprises
AWS Summit Singapore 2019 | Bridging Start-ups and EnterprisesAWS Summits
 
AWS Summit Singapore 2019 | Hiring a Global Rock Star Team: Tips and Tricks
AWS Summit Singapore 2019 | Hiring a Global Rock Star Team: Tips and TricksAWS Summit Singapore 2019 | Hiring a Global Rock Star Team: Tips and Tricks
AWS Summit Singapore 2019 | Hiring a Global Rock Star Team: Tips and TricksAWS Summits
 
AWS Summit Singapore 2019 | Five Common Technical Challenges for Startups
AWS Summit Singapore 2019 | Five Common Technical Challenges for StartupsAWS Summit Singapore 2019 | Five Common Technical Challenges for Startups
AWS Summit Singapore 2019 | Five Common Technical Challenges for StartupsAWS Summits
 
AWS Summit Singapore 2019 | A Founder's Journey to Exit
AWS Summit Singapore 2019 | A Founder's Journey to ExitAWS Summit Singapore 2019 | A Founder's Journey to Exit
AWS Summit Singapore 2019 | A Founder's Journey to ExitAWS Summits
 
AWS Summit Singapore 2019 | Realising Business Value with AWS Analytics Services
AWS Summit Singapore 2019 | Realising Business Value with AWS Analytics ServicesAWS Summit Singapore 2019 | Realising Business Value with AWS Analytics Services
AWS Summit Singapore 2019 | Realising Business Value with AWS Analytics ServicesAWS Summits
 
AWS Summit Singapore 2019 | Snowflake: Your Data. No Limits
AWS Summit Singapore 2019 | Snowflake: Your Data. No LimitsAWS Summit Singapore 2019 | Snowflake: Your Data. No Limits
AWS Summit Singapore 2019 | Snowflake: Your Data. No LimitsAWS Summits
 
AWS Summit Singapore 2019 | Amazon Digital User Engagement Solutions
AWS Summit Singapore 2019 | Amazon Digital User Engagement SolutionsAWS Summit Singapore 2019 | Amazon Digital User Engagement Solutions
AWS Summit Singapore 2019 | Amazon Digital User Engagement SolutionsAWS Summits
 
AWS Summit Singapore 2019 | Driving Business Outcomes with Data Lake on AWS
AWS Summit Singapore 2019 | Driving Business Outcomes with Data Lake on AWSAWS Summit Singapore 2019 | Driving Business Outcomes with Data Lake on AWS
AWS Summit Singapore 2019 | Driving Business Outcomes with Data Lake on AWSAWS Summits
 
AWS Summit Singapore 2019 | Big Data Analytics Architectural Patterns and Bes...
AWS Summit Singapore 2019 | Big Data Analytics Architectural Patterns and Bes...AWS Summit Singapore 2019 | Big Data Analytics Architectural Patterns and Bes...
AWS Summit Singapore 2019 | Big Data Analytics Architectural Patterns and Bes...AWS Summits
 
AWS Summit Singapore 2019 | Microsoft DevOps on AWS
AWS Summit Singapore 2019 | Microsoft DevOps on AWSAWS Summit Singapore 2019 | Microsoft DevOps on AWS
AWS Summit Singapore 2019 | Microsoft DevOps on AWSAWS Summits
 
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...AWS Summits
 
AWS Summit Singapore 2019 | Accelerating Enterprise Cloud Transformation by M...
AWS Summit Singapore 2019 | Accelerating Enterprise Cloud Transformation by M...AWS Summit Singapore 2019 | Accelerating Enterprise Cloud Transformation by M...
AWS Summit Singapore 2019 | Accelerating Enterprise Cloud Transformation by M...AWS Summits
 
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
AWS Summit Singapore 2019 | Operating Microservices at HyperscaleAWS Summit Singapore 2019 | Operating Microservices at Hyperscale
AWS Summit Singapore 2019 | Operating Microservices at HyperscaleAWS Summits
 
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes WorkloadsAWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes WorkloadsAWS Summits
 
AWS Summit Singapore 2019 | Realising Business Value
AWS Summit Singapore 2019 | Realising Business ValueAWS Summit Singapore 2019 | Realising Business Value
AWS Summit Singapore 2019 | Realising Business ValueAWS Summits
 
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summits
 
AWS Summit Singapore 2019 | Transformation Towards a Digital Native Enterprise
AWS Summit Singapore 2019 | Transformation Towards a Digital Native EnterpriseAWS Summit Singapore 2019 | Transformation Towards a Digital Native Enterprise
AWS Summit Singapore 2019 | Transformation Towards a Digital Native EnterpriseAWS Summits
 
AWS Summit Singapore 2019 | Pragmatic Container Security
AWS Summit Singapore 2019 | Pragmatic Container SecurityAWS Summit Singapore 2019 | Pragmatic Container Security
AWS Summit Singapore 2019 | Pragmatic Container SecurityAWS Summits
 
AWS Summit Singapore 2019 | Enterprise Migration Journey Roadmap
AWS Summit Singapore 2019 | Enterprise Migration Journey RoadmapAWS Summit Singapore 2019 | Enterprise Migration Journey Roadmap
AWS Summit Singapore 2019 | Enterprise Migration Journey RoadmapAWS Summits
 

Mais de AWS Summits (20)

AWS Summit Singapore 2019 | The Smart Way to Build an AI & ML Strategy for Yo...
AWS Summit Singapore 2019 | The Smart Way to Build an AI & ML Strategy for Yo...AWS Summit Singapore 2019 | The Smart Way to Build an AI & ML Strategy for Yo...
AWS Summit Singapore 2019 | The Smart Way to Build an AI & ML Strategy for Yo...
 
AWS Summit Singapore 2019 | Bridging Start-ups and Enterprises
AWS Summit Singapore 2019 | Bridging Start-ups and EnterprisesAWS Summit Singapore 2019 | Bridging Start-ups and Enterprises
AWS Summit Singapore 2019 | Bridging Start-ups and Enterprises
 
AWS Summit Singapore 2019 | Hiring a Global Rock Star Team: Tips and Tricks
AWS Summit Singapore 2019 | Hiring a Global Rock Star Team: Tips and TricksAWS Summit Singapore 2019 | Hiring a Global Rock Star Team: Tips and Tricks
AWS Summit Singapore 2019 | Hiring a Global Rock Star Team: Tips and Tricks
 
AWS Summit Singapore 2019 | Five Common Technical Challenges for Startups
AWS Summit Singapore 2019 | Five Common Technical Challenges for StartupsAWS Summit Singapore 2019 | Five Common Technical Challenges for Startups
AWS Summit Singapore 2019 | Five Common Technical Challenges for Startups
 
AWS Summit Singapore 2019 | A Founder's Journey to Exit
AWS Summit Singapore 2019 | A Founder's Journey to ExitAWS Summit Singapore 2019 | A Founder's Journey to Exit
AWS Summit Singapore 2019 | A Founder's Journey to Exit
 
AWS Summit Singapore 2019 | Realising Business Value with AWS Analytics Services
AWS Summit Singapore 2019 | Realising Business Value with AWS Analytics ServicesAWS Summit Singapore 2019 | Realising Business Value with AWS Analytics Services
AWS Summit Singapore 2019 | Realising Business Value with AWS Analytics Services
 
AWS Summit Singapore 2019 | Snowflake: Your Data. No Limits
AWS Summit Singapore 2019 | Snowflake: Your Data. No LimitsAWS Summit Singapore 2019 | Snowflake: Your Data. No Limits
AWS Summit Singapore 2019 | Snowflake: Your Data. No Limits
 
AWS Summit Singapore 2019 | Amazon Digital User Engagement Solutions
AWS Summit Singapore 2019 | Amazon Digital User Engagement SolutionsAWS Summit Singapore 2019 | Amazon Digital User Engagement Solutions
AWS Summit Singapore 2019 | Amazon Digital User Engagement Solutions
 
AWS Summit Singapore 2019 | Driving Business Outcomes with Data Lake on AWS
AWS Summit Singapore 2019 | Driving Business Outcomes with Data Lake on AWSAWS Summit Singapore 2019 | Driving Business Outcomes with Data Lake on AWS
AWS Summit Singapore 2019 | Driving Business Outcomes with Data Lake on AWS
 
AWS Summit Singapore 2019 | Big Data Analytics Architectural Patterns and Bes...
AWS Summit Singapore 2019 | Big Data Analytics Architectural Patterns and Bes...AWS Summit Singapore 2019 | Big Data Analytics Architectural Patterns and Bes...
AWS Summit Singapore 2019 | Big Data Analytics Architectural Patterns and Bes...
 
AWS Summit Singapore 2019 | Microsoft DevOps on AWS
AWS Summit Singapore 2019 | Microsoft DevOps on AWSAWS Summit Singapore 2019 | Microsoft DevOps on AWS
AWS Summit Singapore 2019 | Microsoft DevOps on AWS
 
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...
 
AWS Summit Singapore 2019 | Accelerating Enterprise Cloud Transformation by M...
AWS Summit Singapore 2019 | Accelerating Enterprise Cloud Transformation by M...AWS Summit Singapore 2019 | Accelerating Enterprise Cloud Transformation by M...
AWS Summit Singapore 2019 | Accelerating Enterprise Cloud Transformation by M...
 
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
AWS Summit Singapore 2019 | Operating Microservices at HyperscaleAWS Summit Singapore 2019 | Operating Microservices at Hyperscale
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
 
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes WorkloadsAWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
 
AWS Summit Singapore 2019 | Realising Business Value
AWS Summit Singapore 2019 | Realising Business ValueAWS Summit Singapore 2019 | Realising Business Value
AWS Summit Singapore 2019 | Realising Business Value
 
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
 
AWS Summit Singapore 2019 | Transformation Towards a Digital Native Enterprise
AWS Summit Singapore 2019 | Transformation Towards a Digital Native EnterpriseAWS Summit Singapore 2019 | Transformation Towards a Digital Native Enterprise
AWS Summit Singapore 2019 | Transformation Towards a Digital Native Enterprise
 
AWS Summit Singapore 2019 | Pragmatic Container Security
AWS Summit Singapore 2019 | Pragmatic Container SecurityAWS Summit Singapore 2019 | Pragmatic Container Security
AWS Summit Singapore 2019 | Pragmatic Container Security
 
AWS Summit Singapore 2019 | Enterprise Migration Journey Roadmap
AWS Summit Singapore 2019 | Enterprise Migration Journey RoadmapAWS Summit Singapore 2019 | Enterprise Migration Journey Roadmap
AWS Summit Singapore 2019 | Enterprise Migration Journey Roadmap
 

12 Factor App Methodology for Serverless Apps

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Twelve-factor app methodology and modern applications Uri Segev Principal Solutions Architect Amazon Web Services D E V 3 0 8 Oren Reuveni Solutions Architect Amazon Web Services
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda • What is the “12 Factor app”? • What do we mean by “Serverless”? • 12 Factor in a serverless app • Demo • Takeaways
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. The “12 Factor” model & serverless applications • Methodology for building modern applications • A popular best practice for both developers and operations engineers • Many of the 12 Factor guidelines align directly with best practices for serverless applications and are improved upon given the nature of AWS Lambda, Amazon API Gateway, and other AWS services • However, some of the 12 Factor guidelines don’t directly align with serverless applications or are interpreted very differently
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. What is serverless? No infrastructure provisioning, no management Automatic scaling Pay for value Highly available and secure
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Lambda Run code without provisioning or managing servers Virtually any type of application or backend service Trigger from other AWS services or call it directly from any web or mobile app
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless applications Services (anything) Changes in data state Requests to endpoints Changes in resource state Event source Function Node.js Python Java C# Go Ruby Runtime API
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Lambda AWS Fargate COMPUTE DATA STORES INTEGRATION Amazon Aurora Serverless Amazon S3 Amazon DynamoDB Amazon API Gateway Amazon SNS Amazon SQS AWS Step Functions AWS AppSync
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. The 12 Factors: Let’s explore how the 12 Factors apply to a serverless application: 1. Codebase 2. Dependencies 3. Config 4. Backing services 5. Build, release, run 6. Process 7. Port Binding 8. Concurrency 9. Disposability 10. Dev/prod parity 11. Logs 12. Admin processes https://12factor.net
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1. Codebase 12Factor: “One codebase tracked in revision control, many deploys” Serverless Apps: All code should be stored in revision control (a development best practice). Same repository should be used for all environments deployed to. The bounds of an “application” differ in serverless terms: • If events are shared (i.e., a common Amazon API Gateway) then Lambda function code for those events should be put in the same repository • Otherwise break “services” into their own repositories
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2. Dependencies 12Factor: “Explicitly declare and isolate dependencies” Serverless Apps: Code that is used by multiple functions should be packaged into its own library. Include those libs inside your deployment package or into a AWS Lambda Layer. Node.js, Python, Ruby • Use npm/pip to install libraries • All dependencies must be at root level • .zip file consisting of your code and any dependencies Java • Either .zip file with all code/dependencies, or standalone .jar • Use Maven / Eclipse IDE plugins • Compiled class & resource files at root level, required jars in /lib directory C# (.NET Core) • Either .zip file with all code / dependencies, or a standalone .dll • Use NuGet / VisualStudio plugins • All assemblies (.dll) at root level Go • .zip file consisting of your Go binary and any dependencies • Use “go get” to install dependencies
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lambda Layers Lets functions easily share code: Upload layer once, reference within any function Layer can be anything: dependencies, training data, configuration files, etc Promote separation of responsibilities, lets developers iterate faster on writing business logic Built in support for secure sharing by ecosystem
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 3. Config 12Factor: “Store config in the environment” Serverless Apps: Many ways to do this in serverless applications: • Lambda environment variables • API Gateway stage variables • AWS Systems Manager Parameter Store
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 4. Backing services 12Factor: “Treat backing services as attached resources” Serverless Apps: No differences. Resources that Lambda functions connect to, such as databases, should have their endpoints and access credentials made available via config resources or IAM policies
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 5. Build, Release, Run 12Factor: “Strictly separate build and run stages” Serverless Apps: No differences. Development best practices such as Continuous Integration and Continuous Delivery should be followed. • Use AWS CodeBuild and AWS CodePipeline to support this: AWS CodeBuild AWS CodePipeline
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. CI/CD for serverless applications • Source code repository hosts SAM template • CodePipeline per application • CodeBuild generates a deployable artifact • CodePipeline/CodeDeploy deploys to different environments, with the right config CodeBuildCodeCommit CodePipeline CloudFormation API Gateway Lambda Dev account Step Functions DynamoDBCodeDeploy CloudFormation API Gateway Lambda Test account Step Functions DynamoDB CodeDeploy CloudFormation API Gateway Lambda Prod account Step Functions DynamoDB CodeDeploy Tools accountCode account
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 6. Process 12Factor: “Execute the app as one or more stateless processes” Serverless Apps: This is inherent in how Lambda is designed already: • Lambda Functions should be treated as stateless components • There is no promise of execution environment re-use between function invocations • Data that needs to be kept should be stored in a stateful service such as a database or cache
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 7. Port binding 12Factor: “Export services via port binding” Serverless Apps: In Lambda/serverless applications this factor doesn’t apply the same due to a difference in how Lambda Functions are accessed: • Instead of a “port” Lambda functions are invoked by an event • Lambda functions are invoked in 3 ways: synchronously, asynchronously, and via stream • Instead of having one function support multiple invocation sources, create independent functions
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lambda execution model Synchronous (push) AWS Lambda function /order Asynchronous (event) AWS Lambda function reqs Poll-based changes AWS Lambda service Function Amazon API Gateway Amazon SNS Amazon S3 Amazon DynamoDB Amazon Kinesis
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 8. Concurrency 12Factor: “Scale out via the process model” Serverless Apps: Doesn’t apply. Lambda functions will scale automatically based on load.
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 9. Disposability 12Factor: “Maximize robustness with fast startup and graceful shutdown” Serverless Apps: Shutdown doesn’t apply as Lambda functions and their invocation are tied directly to incoming events. Speed at startup does matter: • Minimize package size to necessities • Do one thing – smaller package size • Reuse – initializing clients/instances outside the handler • Choose the right environment size for optimal operation
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 10. Dev/prod parity 12Factor: “Keep dev, staging, and production as similar as possible” Serverless Apps: This can be made incredibly easy with serverless applications by: • Making use of environment/stage variables or Parameter Store for configuration information, backend resources, etc • Using Serverless Application Models (SAM) to deploy your application • Having a CI/CD process and tooling that supports multiple environments or accounts
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 11. Logs 12Factor: “Treat logs as event streams” Serverless Apps: Logging (as well as Metric collection) are considered a “universal right” in Lambda: • Console output automatically collected and sent to Amazon CloudWatch Logs • Metrics for Lambda and API Gateway for several key stats are automatically collected and sent to CloudWatch • You can easily send more using the CloudWatch SDK
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 12. Admin processes 12Factor: “Run admin/management tasks as one-off processes” Serverless Apps: Doesn’t apply to Lambda since you already limit your functions based on use case. True administrative tasks would occur via their own Lambda Functions.
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Serverless Application Model (SAM) • AWS CloudFormation extension optimized for serverless • Special serverless resource types: • Functions, APIs, SimpleTables and Layers • CLI tool for local development, debugging, testing, deploying, and monitoring of serverless applications https://aws.amazon.com/serverless/sam
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Takeaways • The 12 factor app methodology can assist with designing modern applications properly • Many factors are already built into serverless applications • Serverless applications assist with focusing on our core business https://aws.amazon.com/serverless/
  • 27. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Uri Segev Oren Reuveni http://bit.ly/2SFkTzT