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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Koya Takei
August 26, 2024
46
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
BBQ
matthewcrist
89
10k
Making Projects Easy
brettharned
120
6.7k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
410
Into the Great Unknown - MozCon
thekraken
41
2.6k
Embracing the Ebb and Flow
colly
88
5.1k
Are puppies a ranking factor?
jonoalderson
1
3.7k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Tell your own story through comics
letsgokoyo
1
990
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Become a Pro
speakerdeck
PRO
31
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