SlideShare uma empresa Scribd logo
1 de 41
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
Building Business Workflows with AWS Step Functions
Chris Munns
Principal Developer Advocate
AWS Serverless
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
About me:
Chris Munns - munns@amazon.com, @chrismunns
– Principal 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
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
https://secure.flickr.com/photos/mgifford/4525333972
Why are we
here today?
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
DBMSQueue
Modern application
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Modern application
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Turning functions into apps
“I want to select functions based on data”
“I want to retry functions”
“I want try/catch/finally”
“I have code that runs for hours”
“I want to run functions in parallel”
“I want to sequence functions”
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Example Use Case
Suppose I want to
book my vacation to
the Grand Canyon,
…but unwind my reservations if I can’t rent a car.
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Coordination by method call
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Coordination by function chaining
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Coordination by database
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Coordination by queues
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS
Step Functions
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Manages the logic of
your application. This
removes extra code that
may be repeated in your
microservices and
functions.
Easy to connect and
coordinate
distributed components
and microservices to
quickly create apps
AWS Step Functions
manages state,
checkpoints and restarts
to make sure your
application executes in
order and as expected.
Build and update
Apps Quickly
Write Less Code Improve
Resiliency
Benefits of AWS Step Functions
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
New: Richer workflows
Simplify building workloads such as order
processing, report generation, and data analysis
Write and maintain less code; add services in
minutes
More service integrations:
AWS Step
Functions
Amazon
Simple
Notification
Service
Amazon
Simple Queue
Service
Amazon
SageMaker
AWS Glue AWS Batch Amazon Elastic
Container
Service
AWS Fargate
NEW!
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Use serverless workflows to build and update apps quickly
Task
Choice
Fail
Parallel
Mountains
People
Snow
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Define workflows in JSON
{
"Comment": "Image Processing workflow",
"StartAt": "ExtractImageMetadata",
"States": {
"ExtractImageMetadata": {
"Type": "Task",
"Resource": "arn:aws:lambda:::function:photo-backendExtractImageMetadata-
...",
"InputPath": "$",
"ResultPath": "$.extractedMetadata",
"Next": "ImageTypeCheck",
"Catch": [ {
"ErrorEquals": [ "ImageIdentifyError"],
"Next": "NotSupportedImageType"
} ],
"Retry": [ {
"ErrorEquals": [ "States.ALL"],
"IntervalSeconds": 1,
"MaxAttempts": 2,
"BackoffRate": 1.5 }, ...
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Monitor from the console, CLI or API
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Run each step in sequence
Vendor A
Vendor B
Vendor C
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
…and unwind if my plans fail at any point
Vendor A
Vendor B
Vendor C
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
"HelloWorld": {
"Type": "Task",
…
"Retry": [
{
"ErrorEquals": [”States.TaskFailed"],
"IntervalSeconds": 1,
"MaxAttempts": 2,
"BackoffRate": 2.0
},
… ]
Retry failures
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Catch Exceptions
"HelloWorld": {
"Type": "Task",
…
"Catch": [
{
"ErrorEquals": [”AllYourBaseAreBelongToUs"],
"Next": "CustomErrorFallback"
},
{
"ErrorEquals": ["States.TaskFailed"],
"Next": "ReservedTypeFallback"
… ]
{
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Coordination must-haves
• Scales out
• Doesn’t lose state
• Deals with errors/timeouts
• Easy to build & operate
• Auditable
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Seven state types
Task A single unit of work
Choice Adds branching logic
Parallel Fork and join the data across tasks
Wait Delay for a specified time
Fail Stops an execution and marks it as a failure
Succeed Stops an execution successfully
Pass Passes its input to its output
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Task states for any compute
Long poll
Traditional server
Request
Worker requests
tasks from Step
Functions
Step Functions
invokes the Task
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Customer use-cases
• Build modern applications
• Data processing
• Automate tasks
• Break up monoliths
• Automate Machine Learning (ML) Jobs
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
“I want to sequence functions”
AWS Step Functions, we can easily change and iterate on
the application workflow of our food delivery service in
order to optimize operations and continually improve
delivery times. AWS Step Functions lets us dynamically
scale the steps in our food delivery algorithm so we can
manage spikes in customer orders and meet demand.
Mathias Nitzsche, CTO, foodpanda
“
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Serverless human approval tasks
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
• Challenge
• Transcode ~350 news video clips per day into 14
formats each– as quickly as possible
•
Results
• Able to process video segments in parallel
• Reduced processing time from ~20 min to ~2 minutes
• The bigger the source video, the more segments, the
bigger the savings
Thomson Reuters
Serverless split video transcoding Industry: Media & Entertainment
Solution: Big Data / Machine Learning
Architecture: Serverless
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
How they did it
• Derive keyframe locations within the source
• Split the source at the keyframes
• Process segments (typically 0.5 sec per) in
parallel
• Concatenate segments
• Elapsed time: ~20 min down to ~2 minutes
Workflow
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
• Challenge
• Ensure that their customers won’t run out of disk space
• Avoid having to over-provision storage allocated to RDS
•
Results
• Reduced storage costs up to 60% per database
• Better customer experience
Outsystems
Saved 60% by creating a database resizing microservice Industry: Internet
Solution: IT Automation
Architecture: Microservices
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
How they did it
• Developed an automatic resizing process which they
exposed as a microservice behind Amazon API Gateway
• Takes advantage of the Native Backup and Restore
to/from S3 feature available on RDS SQLServer service
• Use Step Functions as the orchestration engine with all
tasks being Lambda functions
• Reduce default database size from 1024 GB to 400GB –
save 60% right away
• Adjust databases on demand as customer needs grow
Workflow
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
• Challenge
• Update nutrition information on over 100 brands to
comply with updated FDA regulations
•
Results
• Processing time shortened from 36 hours to 10 seconds
• Better productivity: reducing the distance between the
business and development teams identified new
enhancements and improvements that could be quickly
implemented
Coca-Cola
Optimizing nutrition syndication processes
Case Study:
https://aws.amazon.com/solutions/case-studies/bigfinite/
Industry: Retail
Solution: Marketing Automation
Architecture: Serverless
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Solution architecture
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Workflow
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Workflow
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pricing
• Free Tier
• 4,000 state transitions
• per month
• State Transition, Per 1,000
• $0.025 in most regions
• $0.0271 in Asia Pacific (Seoul)
• $0.0279 in US West (N. California)
• $0.0285 in Asia Pacific (Mumbai)
• $0.0300 in AWS GovCloud (US)
Step Functions counts a state transition each time a step of your workflow is executed.
You are charged for the total number of state transitions across all your state machines,
including retries.
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
DEMO!
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
aws.amazon.com/serverless
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Chris Munns
munns@amazon.com
@chrismunnshttps://www.flickr.com/photos/theredproject/3302110152/
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
?
https://secure.flickr.com/photos/dullhunk/202872717/

Mais conteúdo relacionado

Mais procurados

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
 
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 2019AWS Summits
 
The Future of API Management Is Serverless
The Future of API Management Is ServerlessThe Future of API Management Is Serverless
The Future of API Management Is ServerlessChris Munns
 
Serverless Applications with AWS SAM
Serverless Applications with AWS SAMServerless Applications with AWS SAM
Serverless Applications with AWS SAMChris Munns
 
AWS Lambda Layers, the Runtime API, & Nested Applications: re:Invent 2018 Rec...
AWS Lambda Layers, the Runtime API, & Nested Applications: re:Invent 2018 Rec...AWS Lambda Layers, the Runtime API, & Nested Applications: re:Invent 2018 Rec...
AWS Lambda Layers, the Runtime API, & Nested Applications: re:Invent 2018 Rec...Amazon Web Services
 
No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
 No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ... No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...AWS Summits
 
Building API Driven Microservices
Building API Driven MicroservicesBuilding API Driven Microservices
Building API Driven MicroservicesChris Munns
 
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
 
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019AWS Summits
 
AWS Serverless Webinar- Unleash Innovation & Build Modern Application
AWS Serverless Webinar- Unleash Innovation & Build Modern ApplicationAWS Serverless Webinar- Unleash Innovation & Build Modern Application
AWS Serverless Webinar- Unleash Innovation & Build Modern ApplicationAmazon Web Services
 
What can you do with Serverless in 2020
What can you do with Serverless in 2020What can you do with Serverless in 2020
What can you do with Serverless in 2020Boaz Ziniman
 
Overview of Serverless Application Deployment Patterns - AWS Online Tech Talks
Overview of Serverless Application Deployment Patterns - AWS Online Tech TalksOverview of Serverless Application Deployment Patterns - AWS Online Tech Talks
Overview of Serverless Application Deployment Patterns - AWS Online Tech TalksAmazon Web Services
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and youJames Beswick
 
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdfAmazon Web Services
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKDonnie Prakoso
 
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
 
Machine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerMachine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerAmazon Web Services
 
Building Global Serverless Backends powered by Amazon DynamoDB Global Tables
Building Global Serverless Backends powered by Amazon DynamoDB Global TablesBuilding Global Serverless Backends powered by Amazon DynamoDB Global Tables
Building Global Serverless Backends powered by Amazon DynamoDB Global TablesAmazon Web Services
 

Mais procurados (20)

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
 
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
 
The Future of API Management Is Serverless
The Future of API Management Is ServerlessThe Future of API Management Is Serverless
The Future of API Management Is Serverless
 
Serverless Applications with AWS SAM
Serverless Applications with AWS SAMServerless Applications with AWS SAM
Serverless Applications with AWS SAM
 
AWS Lambda Layers, the Runtime API, & Nested Applications: re:Invent 2018 Rec...
AWS Lambda Layers, the Runtime API, & Nested Applications: re:Invent 2018 Rec...AWS Lambda Layers, the Runtime API, & Nested Applications: re:Invent 2018 Rec...
AWS Lambda Layers, the Runtime API, & Nested Applications: re:Invent 2018 Rec...
 
No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
 No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ... No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
 
Building API Driven Microservices
Building API Driven MicroservicesBuilding API Driven Microservices
Building API Driven Microservices
 
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
 
Breaking down the Monowhat
Breaking down the MonowhatBreaking down the Monowhat
Breaking down the Monowhat
 
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
 
AWS business essentials
AWS business essentials AWS business essentials
AWS business essentials
 
AWS Serverless Webinar- Unleash Innovation & Build Modern Application
AWS Serverless Webinar- Unleash Innovation & Build Modern ApplicationAWS Serverless Webinar- Unleash Innovation & Build Modern Application
AWS Serverless Webinar- Unleash Innovation & Build Modern Application
 
What can you do with Serverless in 2020
What can you do with Serverless in 2020What can you do with Serverless in 2020
What can you do with Serverless in 2020
 
Overview of Serverless Application Deployment Patterns - AWS Online Tech Talks
Overview of Serverless Application Deployment Patterns - AWS Online Tech TalksOverview of Serverless Application Deployment Patterns - AWS Online Tech Talks
Overview of Serverless Application Deployment Patterns - AWS Online Tech Talks
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and you
 
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDK
 
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 ...
 
Machine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerMachine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon Sagemaker
 
Building Global Serverless Backends powered by Amazon DynamoDB Global Tables
Building Global Serverless Backends powered by Amazon DynamoDB Global TablesBuilding Global Serverless Backends powered by Amazon DynamoDB Global Tables
Building Global Serverless Backends powered by Amazon DynamoDB Global Tables
 

Semelhante a Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at the AWS Loft - San Francisco

CICDforModernApplications-Oslo.pdf
CICDforModernApplications-Oslo.pdfCICDforModernApplications-Oslo.pdf
CICDforModernApplications-Oslo.pdfAmazon Web Services
 
2020-04-02 DevConf - How to migrate an existing application to serverless
2020-04-02 DevConf - How to migrate an existing application to serverless2020-04-02 DevConf - How to migrate an existing application to serverless
2020-04-02 DevConf - How to migrate an existing application to serverlessMarcia Villalba
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構Amazon Web Services
 
Moving desktops & applications to AWS with Amazon WorkSpaces & AppStream 2 - ...
Moving desktops & applications to AWS with Amazon WorkSpaces & AppStream 2 - ...Moving desktops & applications to AWS with Amazon WorkSpaces & AppStream 2 - ...
Moving desktops & applications to AWS with Amazon WorkSpaces & AppStream 2 - ...Amazon Web Services
 
Modern Applications Development on AWS
Modern Applications Development on AWSModern Applications Development on AWS
Modern Applications Development on AWSBoaz Ziniman
 
AWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applicationsAWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applicationsCobus Bernard
 
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.Amazon Web Services LATAM
 
Move desktops & applications to AWS with Amazon WorkSpaces & AppStream 2.0 - ...
Move desktops & applications to AWS with Amazon WorkSpaces & AppStream 2.0 - ...Move desktops & applications to AWS with Amazon WorkSpaces & AppStream 2.0 - ...
Move desktops & applications to AWS with Amazon WorkSpaces & AppStream 2.0 - ...Amazon Web Services
 
Building Modern Applications on AWS
Building Modern Applications on AWSBuilding Modern Applications on AWS
Building Modern Applications on AWSInjae Kwak
 
End User Collaboration on AWS - AWS Online Tech Talks
End User Collaboration on AWS - AWS Online Tech TalksEnd User Collaboration on AWS - AWS Online Tech Talks
End User Collaboration on AWS - AWS Online Tech TalksAmazon Web Services
 
Move Your Desktops and Apps to AWS with Amazon WorkSpaces and AppStream 2.0 -...
Move Your Desktops and Apps to AWS with Amazon WorkSpaces and AppStream 2.0 -...Move Your Desktops and Apps to AWS with Amazon WorkSpaces and AppStream 2.0 -...
Move Your Desktops and Apps to AWS with Amazon WorkSpaces and AppStream 2.0 -...Amazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Introduction to Serverless computing and AWS Lambda - Floor28
Introduction to Serverless computing and AWS Lambda - Floor28Introduction to Serverless computing and AWS Lambda - Floor28
Introduction to Serverless computing and AWS Lambda - Floor28Boaz Ziniman
 
Introduction to Serverless computing and AWS Lambda | AWS Floor28
Introduction to Serverless computing and AWS Lambda | AWS Floor28Introduction to Serverless computing and AWS Lambda | AWS Floor28
Introduction to Serverless computing and AWS Lambda | AWS Floor28Amazon Web Services
 
Introduction to the Serverless Cloud
Introduction to the Serverless CloudIntroduction to the Serverless Cloud
Introduction to the Serverless CloudAmazon Web Services
 
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech TalksModernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech TalksAmazon Web Services
 
Building a Better Business Case for Migrating to Cloud
Building a Better Business Case for Migrating to CloudBuilding a Better Business Case for Migrating to Cloud
Building a Better Business Case for Migrating to CloudAmazon Web Services
 

Semelhante a Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at the AWS Loft - San Francisco (20)

CICDforModernApplications-Oslo.pdf
CICDforModernApplications-Oslo.pdfCICDforModernApplications-Oslo.pdf
CICDforModernApplications-Oslo.pdf
 
2020-04-02 DevConf - How to migrate an existing application to serverless
2020-04-02 DevConf - How to migrate an existing application to serverless2020-04-02 DevConf - How to migrate an existing application to serverless
2020-04-02 DevConf - How to migrate an existing application to serverless
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構
 
Moving desktops & applications to AWS with Amazon WorkSpaces & AppStream 2 - ...
Moving desktops & applications to AWS with Amazon WorkSpaces & AppStream 2 - ...Moving desktops & applications to AWS with Amazon WorkSpaces & AppStream 2 - ...
Moving desktops & applications to AWS with Amazon WorkSpaces & AppStream 2 - ...
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Modern Applications Development on AWS
Modern Applications Development on AWSModern Applications Development on AWS
Modern Applications Development on AWS
 
CI/CD for Modern Applications
CI/CD for Modern ApplicationsCI/CD for Modern Applications
CI/CD for Modern Applications
 
AWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applicationsAWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applications
 
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.
 
Move desktops & applications to AWS with Amazon WorkSpaces & AppStream 2.0 - ...
Move desktops & applications to AWS with Amazon WorkSpaces & AppStream 2.0 - ...Move desktops & applications to AWS with Amazon WorkSpaces & AppStream 2.0 - ...
Move desktops & applications to AWS with Amazon WorkSpaces & AppStream 2.0 - ...
 
Serverless - State of the Union
Serverless - State of the UnionServerless - State of the Union
Serverless - State of the Union
 
Building Modern Applications on AWS
Building Modern Applications on AWSBuilding Modern Applications on AWS
Building Modern Applications on AWS
 
End User Collaboration on AWS - AWS Online Tech Talks
End User Collaboration on AWS - AWS Online Tech TalksEnd User Collaboration on AWS - AWS Online Tech Talks
End User Collaboration on AWS - AWS Online Tech Talks
 
Move Your Desktops and Apps to AWS with Amazon WorkSpaces and AppStream 2.0 -...
Move Your Desktops and Apps to AWS with Amazon WorkSpaces and AppStream 2.0 -...Move Your Desktops and Apps to AWS with Amazon WorkSpaces and AppStream 2.0 -...
Move Your Desktops and Apps to AWS with Amazon WorkSpaces and AppStream 2.0 -...
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Introduction to Serverless computing and AWS Lambda - Floor28
Introduction to Serverless computing and AWS Lambda - Floor28Introduction to Serverless computing and AWS Lambda - Floor28
Introduction to Serverless computing and AWS Lambda - Floor28
 
Introduction to Serverless computing and AWS Lambda | AWS Floor28
Introduction to Serverless computing and AWS Lambda | AWS Floor28Introduction to Serverless computing and AWS Lambda | AWS Floor28
Introduction to Serverless computing and AWS Lambda | AWS Floor28
 
Introduction to the Serverless Cloud
Introduction to the Serverless CloudIntroduction to the Serverless Cloud
Introduction to the Serverless Cloud
 
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech TalksModernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
Modernize Your Desktop and Application Delivery with AWS - AWS Online Tech Talks
 
Building a Better Business Case for Migrating to Cloud
Building a Better Business Case for Migrating to CloudBuilding a Better Business Case for Migrating to Cloud
Building a Better Business Case for Migrating to Cloud
 

Mais de Amazon Web Services

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...Amazon Web Services
 
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...Amazon Web Services
 
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 FargateAmazon Web Services
 
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 Amazon Web Services
 
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...Amazon Web Services
 
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...Amazon Web Services
 
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 WorkloadsAmazon Web Services
 
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 sfatareAmazon Web Services
 
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 NodeJSAmazon Web Services
 
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 webAmazon Web Services
 
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 sfatareAmazon 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 AWSAmazon 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 DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon 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
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSAmazon 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
 
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
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
 

Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at the AWS Loft - San Francisco

  • 1. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft Building Business Workflows with AWS Step Functions Chris Munns Principal Developer Advocate AWS Serverless
  • 2. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved About me: Chris Munns - munns@amazon.com, @chrismunns – Principal 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
  • 3. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved https://secure.flickr.com/photos/mgifford/4525333972 Why are we here today?
  • 4. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved DBMSQueue Modern application
  • 5. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Modern application
  • 6. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Turning functions into apps “I want to select functions based on data” “I want to retry functions” “I want try/catch/finally” “I have code that runs for hours” “I want to run functions in parallel” “I want to sequence functions”
  • 7. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Example Use Case Suppose I want to book my vacation to the Grand Canyon, …but unwind my reservations if I can’t rent a car.
  • 8. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Coordination by method call
  • 9. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Coordination by function chaining
  • 10. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Coordination by database
  • 11. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Coordination by queues
  • 12. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS Step Functions
  • 13. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Manages the logic of your application. This removes extra code that may be repeated in your microservices and functions. Easy to connect and coordinate distributed components and microservices to quickly create apps AWS Step Functions manages state, checkpoints and restarts to make sure your application executes in order and as expected. Build and update Apps Quickly Write Less Code Improve Resiliency Benefits of AWS Step Functions
  • 14. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved New: Richer workflows Simplify building workloads such as order processing, report generation, and data analysis Write and maintain less code; add services in minutes More service integrations: AWS Step Functions Amazon Simple Notification Service Amazon Simple Queue Service Amazon SageMaker AWS Glue AWS Batch Amazon Elastic Container Service AWS Fargate NEW!
  • 15. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Use serverless workflows to build and update apps quickly Task Choice Fail Parallel Mountains People Snow
  • 16. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Define workflows in JSON { "Comment": "Image Processing workflow", "StartAt": "ExtractImageMetadata", "States": { "ExtractImageMetadata": { "Type": "Task", "Resource": "arn:aws:lambda:::function:photo-backendExtractImageMetadata- ...", "InputPath": "$", "ResultPath": "$.extractedMetadata", "Next": "ImageTypeCheck", "Catch": [ { "ErrorEquals": [ "ImageIdentifyError"], "Next": "NotSupportedImageType" } ], "Retry": [ { "ErrorEquals": [ "States.ALL"], "IntervalSeconds": 1, "MaxAttempts": 2, "BackoffRate": 1.5 }, ...
  • 17. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Monitor from the console, CLI or API
  • 18. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Run each step in sequence Vendor A Vendor B Vendor C
  • 19. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved …and unwind if my plans fail at any point Vendor A Vendor B Vendor C
  • 20. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved "HelloWorld": { "Type": "Task", … "Retry": [ { "ErrorEquals": [”States.TaskFailed"], "IntervalSeconds": 1, "MaxAttempts": 2, "BackoffRate": 2.0 }, … ] Retry failures
  • 21. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Catch Exceptions "HelloWorld": { "Type": "Task", … "Catch": [ { "ErrorEquals": [”AllYourBaseAreBelongToUs"], "Next": "CustomErrorFallback" }, { "ErrorEquals": ["States.TaskFailed"], "Next": "ReservedTypeFallback" … ] {
  • 22. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Coordination must-haves • Scales out • Doesn’t lose state • Deals with errors/timeouts • Easy to build & operate • Auditable
  • 23. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Seven state types Task A single unit of work Choice Adds branching logic Parallel Fork and join the data across tasks Wait Delay for a specified time Fail Stops an execution and marks it as a failure Succeed Stops an execution successfully Pass Passes its input to its output
  • 24. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Task states for any compute Long poll Traditional server Request Worker requests tasks from Step Functions Step Functions invokes the Task
  • 25. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Customer use-cases • Build modern applications • Data processing • Automate tasks • Break up monoliths • Automate Machine Learning (ML) Jobs
  • 26. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved “I want to sequence functions” AWS Step Functions, we can easily change and iterate on the application workflow of our food delivery service in order to optimize operations and continually improve delivery times. AWS Step Functions lets us dynamically scale the steps in our food delivery algorithm so we can manage spikes in customer orders and meet demand. Mathias Nitzsche, CTO, foodpanda “
  • 27. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Serverless human approval tasks
  • 28. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
  • 29. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved • Challenge • Transcode ~350 news video clips per day into 14 formats each– as quickly as possible • Results • Able to process video segments in parallel • Reduced processing time from ~20 min to ~2 minutes • The bigger the source video, the more segments, the bigger the savings Thomson Reuters Serverless split video transcoding Industry: Media & Entertainment Solution: Big Data / Machine Learning Architecture: Serverless
  • 30. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved How they did it • Derive keyframe locations within the source • Split the source at the keyframes • Process segments (typically 0.5 sec per) in parallel • Concatenate segments • Elapsed time: ~20 min down to ~2 minutes Workflow
  • 31. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved • Challenge • Ensure that their customers won’t run out of disk space • Avoid having to over-provision storage allocated to RDS • Results • Reduced storage costs up to 60% per database • Better customer experience Outsystems Saved 60% by creating a database resizing microservice Industry: Internet Solution: IT Automation Architecture: Microservices
  • 32. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved How they did it • Developed an automatic resizing process which they exposed as a microservice behind Amazon API Gateway • Takes advantage of the Native Backup and Restore to/from S3 feature available on RDS SQLServer service • Use Step Functions as the orchestration engine with all tasks being Lambda functions • Reduce default database size from 1024 GB to 400GB – save 60% right away • Adjust databases on demand as customer needs grow Workflow
  • 33. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved • Challenge • Update nutrition information on over 100 brands to comply with updated FDA regulations • Results • Processing time shortened from 36 hours to 10 seconds • Better productivity: reducing the distance between the business and development teams identified new enhancements and improvements that could be quickly implemented Coca-Cola Optimizing nutrition syndication processes Case Study: https://aws.amazon.com/solutions/case-studies/bigfinite/ Industry: Retail Solution: Marketing Automation Architecture: Serverless
  • 34. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Solution architecture
  • 35. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Workflow
  • 36. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Workflow
  • 37. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pricing • Free Tier • 4,000 state transitions • per month • State Transition, Per 1,000 • $0.025 in most regions • $0.0271 in Asia Pacific (Seoul) • $0.0279 in US West (N. California) • $0.0285 in Asia Pacific (Mumbai) • $0.0300 in AWS GovCloud (US) Step Functions counts a state transition each time a step of your workflow is executed. You are charged for the total number of state transitions across all your state machines, including retries.
  • 38. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved DEMO!
  • 39. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved aws.amazon.com/serverless
  • 40. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Chris Munns munns@amazon.com @chrismunnshttps://www.flickr.com/photos/theredproject/3302110152/
  • 41. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved ? https://secure.flickr.com/photos/dullhunk/202872717/