SlideShare a Scribd company logo
1 of 59
S U M M I T
Taipei
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Step Functions
Kwunhok Chan
Solutions Architect
Amazon Web Services
S e s s i o n I D
CoCo Lin
Engineer
Trend Micro
Bruce WY Lin
Senior Engineer
Trend Micro
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
No servers to provision
or manage
Scales with usage
Never pay for idle Availability and
fault-tolerance built in
Serverless means…
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
SERVICES (ANYTHING)
Changes in
data state
Requests to
endpoints
Changes in
resource state
EVENT SOURCE FUNCTION
Node.js
Python
Java
C#
Go
Ruby
and more…
Serverless applications
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
DBMSQueue
Modern App
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Modern App
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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.S U M M I T
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.S U M M I T
Coordination by method call
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Coordination by function chaining
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Coordination by database
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Coordination by queues
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS
Step Functions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Benefits of AWS Step Functions
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
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Run each step in sequence
Vendor A
Vendor B
Vendor C
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
…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.S U M M I T
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.S U M M I T
Application lifecycle in AWS Step Functions
Visualize in the
Console
Define in JSON Monitor
Executions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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.S U M M I T
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.S U M M I T
Build visual workflows from state types
Task
Choice
Fail
Parallel
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Common Use Cases
• Build modern applications
• Data processing
• Automate tasks
• Break-up monoliths
• Automate Machine Learning (ML) jobs
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Big Data AI/ML
Data
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Raw Data
Behavior
Features
Static
Features
Verify Data Analyze
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
[ "static_features_1.log",
"static_features_2.log" ]
{"schema": "static_features",
"result": "passed"}
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
{
"static_features": [
"static_features_1.log",
"static_features_2.log"],
…
…
…
”behavior_features": [
"behavior_features_1.log",
"behavior_features_2.log"],
…
…
…
}
Get value from key “static_features” :
["static_features_1.log",
"static_features_2.log"]
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
Get value from key “static_features” :
["static_features_1.log",
"static_features_2.log"]
Verification
on
EMR
Get value from key “static_features” :
["static_features_1.log",
"static_features_2.log"]
Verification
on
EMR
Get value from key “behavior_features” :
[" behavior_features _1.log",
" behavior_features _2.log"]
Verification
on
EMR
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
["static_features_1.log",
"static_features_2.log"]
Parallel
InputPath=$.static_features
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
{
"static_features": [
"static_features_1.log",
"static_features_2.log"],
…
…
…
”behavior_features": [
"behavior_features_1.log",
"behavior_features_2.log"],
…
…
…
}
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
["static_features_1.log",
"static_features_2.log"]
Parallel
InputPath=$.static_features
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
["behavior_features _1.log",
"behavior_features _2.log"]
InputPath=$.static_features
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
["static_features_1.log",
"static_features_2.log"]
Parallel
InputPath=$.static_features
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
["behavior_features _1.log",
"behavior_features _2.log"]
InputPath=$.static_features
Fail
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
["static_features_1.log",
"static_features_2.log"]
Parallel
InputPath=$.static_features
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
["behavior_features _1.log",
"behavior_features _2.log"]
InputPath=$.static_features
Fail
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
["static_features_1.log",
"static_features_2.log"]
Parallel
InputPath=$.static_features
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
Succeed
Choice
Fail
Verification
on
EMR
Task
Wait
["behavior_features _1.log",
"behavior_features _2.log"]
InputPath=$.static_features
Fail
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Succeed
Choice
Pass
Task
Wait
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Succeed
Choice
Pass
Task
Wait
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Infinite Loop
• Your bill may be infinite, too
SucceedPass
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Dead and… End
• Often happened while waiting
• Do nothing
• Get nothing
SucceedPass
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Only One Timeout
• No timeout for sub-
workflow
SucceedPass SucceedPass
Parallel
8 mins 24 mins
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Risk Summary Run It
Infinite Loop
Add
Timeout
Dead and… End
Adjust
Timeout
Only
One
Timeout
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Simplified Job Status Poller
Poller
Submitter
Error
Handler
Succeed
SucceedPass
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
If emr_status == ‘COMPLETED’:
pass
elif emr_status in [‘PENDING’, ‘RUNNING’]:
raise AsyncTaskUnfinished(‘go to retry’)
"Poller":{
"Type": "Task",
"Next": "Succeed",
"ResultPath": "$.output.poller",
"Retry":[
{
"ErrorEquals": ["AsyncTaskUnfinished"],
"IntervalSeconds": 10,
"MaxAttempts": 3,
}
]
}
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Poller
Submitter
Error
Handler
Succeed
"Poller":{
"Type": "Task",
"Next": "Succeed",
"ResultPath": "$.output.poller",
"Retry":[
{
"ErrorEquals": ["AsyncTaskUnfinished"],
"IntervalSeconds": 10,
"MaxAttempts": 3,
"BackoffRate": 2.0
}
]
}
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Custom Errors Save Life
"Poller":{
"Type": "Task",
"Next": "Succeed",
"ResultPath": "$.output.poller",
"Retry":[
{
"ErrorEquals": ["AsyncTaskUnfinished"],
"IntervalSeconds": 10,
"MaxAttempts": 3,
"BackoffRate": 2.0
}
],
"Catch":[
{
"ErrorEquals": [" AsyncTaskFailed"],
"ResultPath": "$.error.poller",
"Next": "ErrorHandler"
}
]
},
"ErrorHandler": {
"Type": "Task",
"ResultPath": "$.error",
"End": true
}
if emr_status in [‘CANCELLED’, ‘FAILED’,
‘INTERRUPTED’]:
raise AsyncTaskFailed(‘go to error handler ’)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
"PollerA":{
"Type": "Task",
"Next": "Succeed",
"ResultPath": "$.output.poller",
"Retry":[
{
"ErrorEquals": ["AsyncTaskUnfinished"],
"IntervalSeconds": 10,
"MaxAttempts": 3,
}
],
},
"PollerB":{
"Type": "Task",
"Next": "Succeed",
"ResultPath": "$.output.poller",
"Retry":[
{
"ErrorEquals": ["AsyncTaskUnfinished"],
"IntervalSeconds": 5,
"MaxAttempts": 100,
}
],
},
Parallel
Start
PollerA
Submitter
Error
Handler
Succeed
30s
PollerB
Submitter
Error
Handler
Succeed
500s
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Step Functions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
3 Problems
Infinite Loop
Dead and… End
Only One Timeout
3 Solutions
Retry Has Max
Custom Errors Save Life
Retry Makes Timeout Anywhere
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Better Step Functions
Step Functions Better
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kwunhok Chan
Solutions Architect
Amazon Web
Services
CoCo Lin
Engineer
Trend Micro
Bruce WY Lin
Senior Engineer
Trend Micro
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I TS U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

Building-Serverless-Analytics-On-AWS
Building-Serverless-Analytics-On-AWSBuilding-Serverless-Analytics-On-AWS
Building-Serverless-Analytics-On-AWSAmazon Web Services
 
Building-Event-Driven-Serverless-Apps-with-AWS-Event-Forkines
Building-Event-Driven-Serverless-Apps-with-AWS-Event-ForkinesBuilding-Event-Driven-Serverless-Apps-with-AWS-Event-Forkines
Building-Event-Driven-Serverless-Apps-with-AWS-Event-ForkinesAmazon Web Services
 
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
 
AWS Analytics Services - When to use what? | AWS Summit Tel Aviv 2019
AWS Analytics Services - When to use what? | AWS Summit Tel Aviv 2019AWS Analytics Services - When to use what? | AWS Summit Tel Aviv 2019
AWS Analytics Services - When to use what? | AWS Summit Tel Aviv 2019AWS Summits
 
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...AWS Summits
 
AWS 如何協助客戶建立 DevOps 流程
AWS 如何協助客戶建立 DevOps 流程AWS 如何協助客戶建立 DevOps 流程
AWS 如何協助客戶建立 DevOps 流程Amazon Web Services
 
Modern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECSModern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECSAmazon Web Services
 
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...Amazon 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
 
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS SummitConnecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS SummitAmazon Web Services
 
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitInfrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitAmazon Web Services
 
從業人員指南-如何像技術專家一樣守護您的雲端安全
從業人員指南-如何像技術專家一樣守護您的雲端安全從業人員指南-如何像技術專家一樣守護您的雲端安全
從業人員指南-如何像技術專家一樣守護您的雲端安全Amazon Web Services
 
Simplify compliance & improve operational efficiency with AWS - SVC302 - Sant...
Simplify compliance & improve operational efficiency with AWS - SVC302 - Sant...Simplify compliance & improve operational efficiency with AWS - SVC302 - Sant...
Simplify compliance & improve operational efficiency with AWS - SVC302 - Sant...Amazon Web Services
 
如何成功的完成混合雲遷移專案
如何成功的完成混合雲遷移專案如何成功的完成混合雲遷移專案
如何成功的完成混合雲遷移專案Amazon Web Services
 
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
 
What's New in Amazon Aurora - ADB203 - Anaheim AWS Summit
What's New in Amazon Aurora - ADB203 - Anaheim AWS SummitWhat's New in Amazon Aurora - ADB203 - Anaheim AWS Summit
What's New in Amazon Aurora - ADB203 - Anaheim AWS SummitAmazon Web Services
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019AWS Summits
 
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...Amazon Web Services
 

What's hot (19)

Building-Serverless-Analytics-On-AWS
Building-Serverless-Analytics-On-AWSBuilding-Serverless-Analytics-On-AWS
Building-Serverless-Analytics-On-AWS
 
Building-Event-Driven-Serverless-Apps-with-AWS-Event-Forkines
Building-Event-Driven-Serverless-Apps-with-AWS-Event-ForkinesBuilding-Event-Driven-Serverless-Apps-with-AWS-Event-Forkines
Building-Event-Driven-Serverless-Apps-with-AWS-Event-Forkines
 
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
 
AWS Analytics Services - When to use what? | AWS Summit Tel Aviv 2019
AWS Analytics Services - When to use what? | AWS Summit Tel Aviv 2019AWS Analytics Services - When to use what? | AWS Summit Tel Aviv 2019
AWS Analytics Services - When to use what? | AWS Summit Tel Aviv 2019
 
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
 
Breaking down the Monowhat
Breaking down the MonowhatBreaking down the Monowhat
Breaking down the Monowhat
 
AWS 如何協助客戶建立 DevOps 流程
AWS 如何協助客戶建立 DevOps 流程AWS 如何協助客戶建立 DevOps 流程
AWS 如何協助客戶建立 DevOps 流程
 
Modern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECSModern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECS
 
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
 
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 ...
 
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS SummitConnecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit
 
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitInfrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
 
從業人員指南-如何像技術專家一樣守護您的雲端安全
從業人員指南-如何像技術專家一樣守護您的雲端安全從業人員指南-如何像技術專家一樣守護您的雲端安全
從業人員指南-如何像技術專家一樣守護您的雲端安全
 
Simplify compliance & improve operational efficiency with AWS - SVC302 - Sant...
Simplify compliance & improve operational efficiency with AWS - SVC302 - Sant...Simplify compliance & improve operational efficiency with AWS - SVC302 - Sant...
Simplify compliance & improve operational efficiency with AWS - SVC302 - Sant...
 
如何成功的完成混合雲遷移專案
如何成功的完成混合雲遷移專案如何成功的完成混合雲遷移專案
如何成功的完成混合雲遷移專案
 
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
 
What's New in Amazon Aurora - ADB203 - Anaheim AWS Summit
What's New in Amazon Aurora - ADB203 - Anaheim AWS SummitWhat's New in Amazon Aurora - ADB203 - Anaheim AWS Summit
What's New in Amazon Aurora - ADB203 - Anaheim AWS Summit
 
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
 
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
 

Similar to 利用 AWS Step Functions 建構穩健的資料處理流程

2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices
2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices
2019 06-12-aws taipei summit-dev day-essential capabilities behind microservicesKim Kao
 
Websites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinWebsites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinBoaz Ziniman
 
Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at ...
Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at ...Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at ...
Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at ...Amazon Web Services
 
Building Business Workflows with AWS Step Functions
Building Business Workflows with AWS Step FunctionsBuilding Business Workflows with AWS Step Functions
Building Business Workflows with AWS Step FunctionsAmazon Web Services
 
Threat detection and mitigation at AWS - SEC201 - Atlanta AWS Summit
Threat detection and mitigation at AWS - SEC201 - Atlanta AWS SummitThreat detection and mitigation at AWS - SEC201 - Atlanta AWS Summit
Threat detection and mitigation at AWS - SEC201 - Atlanta AWS SummitAmazon Web Services
 
The Zen of governance - Establish guardrails and empower builders - SVC201 - ...
The Zen of governance - Establish guardrails and empower builders - SVC201 - ...The Zen of governance - Establish guardrails and empower builders - SVC201 - ...
The Zen of governance - Establish guardrails and empower builders - SVC201 - ...Amazon Web Services
 
Automatic Labelling and Model Tuning with Amazon SageMaker - AWS Summit Sydney
Automatic Labelling and Model Tuning with Amazon SageMaker - AWS Summit SydneyAutomatic Labelling and Model Tuning with Amazon SageMaker - AWS Summit Sydney
Automatic Labelling and Model Tuning with Amazon SageMaker - AWS Summit SydneyAmazon Web Services
 
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS Summit
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS SummitHow Nubank is building a customer-obsessed bank - FSV201 - New York AWS Summit
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS SummitAmazon Web Services
 
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...Amazon Web Services
 
Essential capabilities behind Microservices
Essential capabilities behind MicroservicesEssential capabilities behind Microservices
Essential capabilities behind MicroservicesAmazon Web Services
 
Build secure, offline, real-time-enabled mobile apps - MAD304 - Atlanta AWS S...
Build secure, offline, real-time-enabled mobile apps - MAD304 - Atlanta AWS S...Build secure, offline, real-time-enabled mobile apps - MAD304 - Atlanta AWS S...
Build secure, offline, real-time-enabled mobile apps - MAD304 - Atlanta AWS S...Amazon Web Services
 
Operationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
Operationalizing Microsoft Workloads, AWS Federal Pop-Up LoftOperationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
Operationalizing Microsoft Workloads, AWS Federal Pop-Up LoftAmazon Web Services
 
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS SummitHow to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS SummitAmazon Web Services
 
Automate Security Event Management Using Trust-Based Decision Models - AWS Su...
Automate Security Event Management Using Trust-Based Decision Models - AWS Su...Automate Security Event Management Using Trust-Based Decision Models - AWS Su...
Automate Security Event Management Using Trust-Based Decision Models - AWS Su...Amazon Web Services
 
Why serverless will revolutionize your software process.
Why serverless will revolutionize your software process.Why serverless will revolutionize your software process.
Why serverless will revolutionize your software process.James Beswick
 
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...Amazon Web Services
 
Innovating FIPS crypto validation in the Cloud - SEP321 - AWS re:Inforce 2019
Innovating FIPS crypto validation in the Cloud - SEP321 - AWS re:Inforce 2019 Innovating FIPS crypto validation in the Cloud - SEP321 - AWS re:Inforce 2019
Innovating FIPS crypto validation in the Cloud - SEP321 - AWS re:Inforce 2019 Amazon Web Services
 
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Amazon Web Services
 
Fraud detection using machine learning with Amazon SageMaker - AIM306 - New Y...
Fraud detection using machine learning with Amazon SageMaker - AIM306 - New Y...Fraud detection using machine learning with Amazon SageMaker - AIM306 - New Y...
Fraud detection using machine learning with Amazon SageMaker - AIM306 - New Y...Amazon Web Services
 

Similar to 利用 AWS Step Functions 建構穩健的資料處理流程 (20)

2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices
2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices
2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices
 
DevOps at Amazon
DevOps at AmazonDevOps at Amazon
DevOps at Amazon
 
Websites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinWebsites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit Berlin
 
Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at ...
Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at ...Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at ...
Building Business Workflows with AWS Step Functions: re:Invent 2018 Recap at ...
 
Building Business Workflows with AWS Step Functions
Building Business Workflows with AWS Step FunctionsBuilding Business Workflows with AWS Step Functions
Building Business Workflows with AWS Step Functions
 
Threat detection and mitigation at AWS - SEC201 - Atlanta AWS Summit
Threat detection and mitigation at AWS - SEC201 - Atlanta AWS SummitThreat detection and mitigation at AWS - SEC201 - Atlanta AWS Summit
Threat detection and mitigation at AWS - SEC201 - Atlanta AWS Summit
 
The Zen of governance - Establish guardrails and empower builders - SVC201 - ...
The Zen of governance - Establish guardrails and empower builders - SVC201 - ...The Zen of governance - Establish guardrails and empower builders - SVC201 - ...
The Zen of governance - Establish guardrails and empower builders - SVC201 - ...
 
Automatic Labelling and Model Tuning with Amazon SageMaker - AWS Summit Sydney
Automatic Labelling and Model Tuning with Amazon SageMaker - AWS Summit SydneyAutomatic Labelling and Model Tuning with Amazon SageMaker - AWS Summit Sydney
Automatic Labelling and Model Tuning with Amazon SageMaker - AWS Summit Sydney
 
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS Summit
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS SummitHow Nubank is building a customer-obsessed bank - FSV201 - New York AWS Summit
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS Summit
 
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...
 
Essential capabilities behind Microservices
Essential capabilities behind MicroservicesEssential capabilities behind Microservices
Essential capabilities behind Microservices
 
Build secure, offline, real-time-enabled mobile apps - MAD304 - Atlanta AWS S...
Build secure, offline, real-time-enabled mobile apps - MAD304 - Atlanta AWS S...Build secure, offline, real-time-enabled mobile apps - MAD304 - Atlanta AWS S...
Build secure, offline, real-time-enabled mobile apps - MAD304 - Atlanta AWS S...
 
Operationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
Operationalizing Microsoft Workloads, AWS Federal Pop-Up LoftOperationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
Operationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
 
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS SummitHow to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
 
Automate Security Event Management Using Trust-Based Decision Models - AWS Su...
Automate Security Event Management Using Trust-Based Decision Models - AWS Su...Automate Security Event Management Using Trust-Based Decision Models - AWS Su...
Automate Security Event Management Using Trust-Based Decision Models - AWS Su...
 
Why serverless will revolutionize your software process.
Why serverless will revolutionize your software process.Why serverless will revolutionize your software process.
Why serverless will revolutionize your software process.
 
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
 
Innovating FIPS crypto validation in the Cloud - SEP321 - AWS re:Inforce 2019
Innovating FIPS crypto validation in the Cloud - SEP321 - AWS re:Inforce 2019 Innovating FIPS crypto validation in the Cloud - SEP321 - AWS re:Inforce 2019
Innovating FIPS crypto validation in the Cloud - SEP321 - AWS re:Inforce 2019
 
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
 
Fraud detection using machine learning with Amazon SageMaker - AIM306 - New Y...
Fraud detection using machine learning with Amazon SageMaker - AIM306 - New Y...Fraud detection using machine learning with Amazon SageMaker - AIM306 - New Y...
Fraud detection using machine learning with Amazon SageMaker - AIM306 - New Y...
 

More from 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
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon 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
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

利用 AWS Step Functions 建構穩健的資料處理流程

  • 1. S U M M I T Taipei
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Step Functions Kwunhok Chan Solutions Architect Amazon Web Services S e s s i o n I D CoCo Lin Engineer Trend Micro Bruce WY Lin Senior Engineer Trend Micro
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T No servers to provision or manage Scales with usage Never pay for idle Availability and fault-tolerance built in Serverless means…
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T SERVICES (ANYTHING) Changes in data state Requests to endpoints Changes in resource state EVENT SOURCE FUNCTION Node.js Python Java C# Go Ruby and more… Serverless applications
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T DBMSQueue Modern App
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Modern App
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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”
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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.
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Coordination by method call
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Coordination by function chaining
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Coordination by database
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Coordination by queues
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Step Functions
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Benefits of AWS Step Functions 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
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Run each step in sequence Vendor A Vendor B Vendor C
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T …and unwind if my plans fail at any point Vendor A Vendor B Vendor C
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Coordination must-haves • Scales out • Doesn’t lose state • Deals with errors/timeouts • Easy to build & operate • Auditable
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Application lifecycle in AWS Step Functions Visualize in the Console Define in JSON Monitor Executions
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Task states for any compute Long poll Traditional server Request Worker requests tasks from Step Functions Step Functions invokes the Task
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Build visual workflows from state types Task Choice Fail Parallel
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Common Use Cases • Build modern applications • Data processing • Automate tasks • Break-up monoliths • Automate Machine Learning (ML) jobs
  • 23. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Big Data AI/ML Data
  • 25. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Raw Data Behavior Features Static Features Verify Data Analyze
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Succeed Choice Fail Verification on EMR Task Wait [ "static_features_1.log", "static_features_2.log" ] {"schema": "static_features", "result": "passed"}
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T { "static_features": [ "static_features_1.log", "static_features_2.log"], … … … ”behavior_features": [ "behavior_features_1.log", "behavior_features_2.log"], … … … } Get value from key “static_features” : ["static_features_1.log", "static_features_2.log"] Succeed Choice Fail Verification on EMR Task Wait Get value from key “static_features” : ["static_features_1.log", "static_features_2.log"] Verification on EMR Get value from key “static_features” : ["static_features_1.log", "static_features_2.log"] Verification on EMR Get value from key “behavior_features” : [" behavior_features _1.log", " behavior_features _2.log"] Verification on EMR
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T ["static_features_1.log", "static_features_2.log"] Parallel InputPath=$.static_features Succeed Choice Fail Verification on EMR Task Wait Succeed Choice Fail Verification on EMR Task Wait { "static_features": [ "static_features_1.log", "static_features_2.log"], … … … ”behavior_features": [ "behavior_features_1.log", "behavior_features_2.log"], … … … }
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T ["static_features_1.log", "static_features_2.log"] Parallel InputPath=$.static_features Succeed Choice Fail Verification on EMR Task Wait Succeed Choice Fail Verification on EMR Task Wait ["behavior_features _1.log", "behavior_features _2.log"] InputPath=$.static_features
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T ["static_features_1.log", "static_features_2.log"] Parallel InputPath=$.static_features Succeed Choice Fail Verification on EMR Task Wait Succeed Choice Fail Verification on EMR Task Wait ["behavior_features _1.log", "behavior_features _2.log"] InputPath=$.static_features Fail
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T ["static_features_1.log", "static_features_2.log"] Parallel InputPath=$.static_features Succeed Choice Fail Verification on EMR Task Wait Succeed Choice Fail Verification on EMR Task Wait ["behavior_features _1.log", "behavior_features _2.log"] InputPath=$.static_features Fail
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T ["static_features_1.log", "static_features_2.log"] Parallel InputPath=$.static_features Succeed Choice Fail Verification on EMR Task Wait Succeed Choice Fail Verification on EMR Task Wait ["behavior_features _1.log", "behavior_features _2.log"] InputPath=$.static_features Fail
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Succeed Choice Pass Task Wait
  • 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Succeed Choice Pass Task Wait
  • 36. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Infinite Loop • Your bill may be infinite, too SucceedPass
  • 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Dead and… End • Often happened while waiting • Do nothing • Get nothing SucceedPass
  • 42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Only One Timeout • No timeout for sub- workflow SucceedPass SucceedPass Parallel 8 mins 24 mins
  • 44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Risk Summary Run It Infinite Loop Add Timeout Dead and… End Adjust Timeout Only One Timeout
  • 45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 46. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Simplified Job Status Poller Poller Submitter Error Handler Succeed SucceedPass
  • 47. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 48. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T If emr_status == ‘COMPLETED’: pass elif emr_status in [‘PENDING’, ‘RUNNING’]: raise AsyncTaskUnfinished(‘go to retry’) "Poller":{ "Type": "Task", "Next": "Succeed", "ResultPath": "$.output.poller", "Retry":[ { "ErrorEquals": ["AsyncTaskUnfinished"], "IntervalSeconds": 10, "MaxAttempts": 3, } ] }
  • 49. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Poller Submitter Error Handler Succeed "Poller":{ "Type": "Task", "Next": "Succeed", "ResultPath": "$.output.poller", "Retry":[ { "ErrorEquals": ["AsyncTaskUnfinished"], "IntervalSeconds": 10, "MaxAttempts": 3, "BackoffRate": 2.0 } ] }
  • 50. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 51. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Custom Errors Save Life "Poller":{ "Type": "Task", "Next": "Succeed", "ResultPath": "$.output.poller", "Retry":[ { "ErrorEquals": ["AsyncTaskUnfinished"], "IntervalSeconds": 10, "MaxAttempts": 3, "BackoffRate": 2.0 } ], "Catch":[ { "ErrorEquals": [" AsyncTaskFailed"], "ResultPath": "$.error.poller", "Next": "ErrorHandler" } ] }, "ErrorHandler": { "Type": "Task", "ResultPath": "$.error", "End": true } if emr_status in [‘CANCELLED’, ‘FAILED’, ‘INTERRUPTED’]: raise AsyncTaskFailed(‘go to error handler ’)
  • 52. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 53. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T "PollerA":{ "Type": "Task", "Next": "Succeed", "ResultPath": "$.output.poller", "Retry":[ { "ErrorEquals": ["AsyncTaskUnfinished"], "IntervalSeconds": 10, "MaxAttempts": 3, } ], }, "PollerB":{ "Type": "Task", "Next": "Succeed", "ResultPath": "$.output.poller", "Retry":[ { "ErrorEquals": ["AsyncTaskUnfinished"], "IntervalSeconds": 5, "MaxAttempts": 100, } ], }, Parallel Start PollerA Submitter Error Handler Succeed 30s PollerB Submitter Error Handler Succeed 500s
  • 54. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 55. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Step Functions
  • 56. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 3 Problems Infinite Loop Dead and… End Only One Timeout 3 Solutions Retry Has Max Custom Errors Save Life Retry Makes Timeout Anywhere
  • 57. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Better Step Functions Step Functions Better
  • 58. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kwunhok Chan Solutions Architect Amazon Web Services CoCo Lin Engineer Trend Micro Bruce WY Lin Senior Engineer Trend Micro
  • 59. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I TS U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.