Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to AWS Step Functions
Search
Koya Takei
August 26, 2024
41
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to AWS Step Functions
Koya Takei
August 26, 2024
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
400
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
Thoughts on Productivity
jonyablonski
76
5.2k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
GraphQLとの向き合い方2022年版
quramy
50
15k
BBQ
matthewcrist
89
10k
Exploring anti-patterns in Rails
aemeredith
3
390
WENDY [Excerpt]
tessaabrams
11
38k
Balancing Empowerment & Direction
lara
6
1.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.6k
Transcript
Introduction to AWS Step Functions Koya Takei
About Me Name: Koya Takei Role: Software Engineer (3+ years)
Experience: LIFULL Co., Ltd. (Proptech) -> M3, inc. (medical tech) Keywords: Operation improvement, Cost reduction
Overview of Step Functions
What is Step Functions? - Visual workflow configuration service -
Integrate and orchestrate different AWS services - AWS Lambda - ECS - SNS - Built-in functions - iteration - parallel execution - error handling
Building workflow rapidly Defined by Amazon States Language (JSON) {
"Function1": { "FunctionName": "arn:aws:lambda:...:function1", "Next": "Function2" }, "Function2": { "FunctionName": "arn:aws:lambda:...:function2", "Next": "Function3" }, "Function3": { "FunctionName": "arn:aws:lambda:...:function3", "End": true } }
Dashboard Workflow dashboard will be created automatically Perform operations -
Monitor progress - Jump to logs - Interrupt - Redrive
Details of Step Functions
Core Concepts - state machine - state entire workflow, which
is a series of event-driven steps each step in a workflow combine states to build a state machine - state machine state machine state
State Types Executes a specific task by calling an AWS
service - Task State - Parallel State - Choice State Runs multiple branches of states simultaneously Branches workflow based on conditions
Task State { "ECS Execution": { "Type": "Task", "Resource": "arn:aws:states:::ecs:runTask",
"Parameters": { "TaskDefinition": "TaskDefinitionArn", "Overrides": { "Command": ["node", "index.js"] } } } } Running ECS task { "Publish to SNS": { "Type": "Task", "Resource": "arn:aws:states:::sns:publish", "Parameters": { "TopicArn": "TopicArn", "Message": "my message", } } } Sending message by SNS
Parallel State Running multiple states in parallel { "Type": "Parallel",
"Branches": [ { "LookUpAddress": { "Type": "Task", "FunctionName": "LambdaArn" } }, { "LookUpName": { "Type": "Task", "FunctionName": "LambdaArn" } } ], }
Choice State { "Choice": { "Type": "Choice", "Choices": [{ "Variable":
"$.price", "NumericGreaterThan": 10000, "Next": "SendMail" }], "Default": "SendItem" }, ... } Branching processes according to the input
Other State Types - Map State - Pass State -
Wait State - Success State - Fail State These can be combined to create complex workflows
Thank you very much! Let's use Step Functions! Check out
my blog post (Japanese) link https://www.m3tech.blog/entry/2024/03/26/140000 or searching “エムスリー バッチ改善”
Wait State Pause and resume execution { "WaitAnHour": { "Type":
"Wait", "Seconds": 3600, "Next": "Function" }, "Function": { "Type": "Task", "FunctionName": "LambdaArn" } }
State Types Executes a specific task by calling an AWS
service Task State Parallel State Choice State Wait State Runs multiple branches of states simultaneously Branches workflow based on conditions Pauses the workflow temporarily