{"id":25010107,"url":"https://github.com/kyopark2014/aws-step-functions","last_synced_at":"2026-04-18T15:34:03.322Z","repository":{"id":37619885,"uuid":"504692042","full_name":"kyopark2014/aws-step-functions","owner":"kyopark2014","description":"It explains how to use step fuctions.","archived":false,"fork":false,"pushed_at":"2023-01-05T03:15:21.000Z","size":298,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T02:32:18.653Z","etag":null,"topics":["aws","lambda","step-functions","workflow"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyopark2014.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-17T22:54:57.000Z","updated_at":"2023-11-17T15:58:13.000Z","dependencies_parsed_at":"2023-02-03T08:16:10.510Z","dependency_job_id":null,"html_url":"https://github.com/kyopark2014/aws-step-functions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kyopark2014/aws-step-functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyopark2014%2Faws-step-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyopark2014%2Faws-step-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyopark2014%2Faws-step-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyopark2014%2Faws-step-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyopark2014","download_url":"https://codeload.github.com/kyopark2014/aws-step-functions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyopark2014%2Faws-step-functions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31974616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","lambda","step-functions","workflow"],"created_at":"2025-02-05T04:52:39.011Z","updated_at":"2026-04-18T15:34:01.855Z","avatar_url":"https://github.com/kyopark2014.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Step Functions\n\n여기에서는 Step Functions 사용 방법 및 CDK deployment에 대해 설명합니다. \n\n## Step Functions 란?\n\nBusiness Logic을 구현하기 위하여, 어떤 서비스가 어떤 Request 시작하면, 필연적으로 재시도, 실패시 예외처리가 필요합니다. 또한 어떤 business logic은 여러 step을 거쳐서 동작하므로 이를 여러개의 모듈 또는 lambda로 구현하는것은 꽤 번거로운 작업입니다. 이러한 workflow를 모듈화하여 visual하게 처리하고, 관리가 필요없는 serverless로 제공한다면, 복잡하게 서비스를 생성하는 것보다 개발기간을 단축하고, 버그나 수정 필요시 빠르게 대응할 수 있습니다.\n\nAWS Step Functions은 low-code visual workflow service입니다. 즉, 최소한의 코드로 workflow를 생성하여 상기의 복잡한 작업을 수행 할 수 있습니다. 또한, AWS의 각종 데이터베이스, ML 서비스들과 쉽게 integration이 가능하므로 빠르게 원하는 work를 수행할 수 있습니다.\n\n\n## 활용 케이스 \n\n[Step Function Case Study](https://github.com/kyopark2014/aws-step-functions/blob/main/case-study.md)에서는 Step Fucntions 활용방안에 대해 설명합니다. \n\n[Wait for Callback](https://github.com/kyopark2014/aws-step-functions/tree/main/Wait-for-Callback)에서는 사람의 승인을 필요로 하거나, 다른 시스템에서 trigger될때까지 기다리게 하기 위한 Step Functions 구현 예제입니다. \n\n## IaC를 이용한 인프라 생성하기 \n\n[CloudFormation으로 Step Functions 만들기](https://github.com/kyopark2014/aws-step-functions/tree/main/cloudformation)를 따라서 CloudFormation으로 인프라 생성이 가능합니다.\n\n[CDK - Step Functions](https://github.com/kyopark2014/aws-step-functions/blob/main/cdk-stepfunctions/README.md)에서는 [AWS CDK](https://github.com/kyopark2014/technical-summary/blob/main/cdk-introduction.md)로 Step Function과 API Gateway를 생성하여 https API로 Step Function을 호출할 수 있음을 보여줍니다. \n\n[CDK를 이용하여 Lambda를 포함한 Step Function 생성](https://github.com/kyopark2014/aws-step-functions/tree/main/cdk-statemachine)에서는 3개의 Lambda를 이용해 구현한 Step Function 입니다. \n\n## Step Functions으로 DynamoDB에 Item 저장하기\n\n[Step Functions - DynamoDB](https://github.com/kyopark2014/aws-step-functions/tree/main/transactionProcessor)는 Step Functions로 DynamoDB에 Item 저장하는 예제입니다. \n\n\n## S3 Trigger\n\n[S3 bucket에서 발생하는 Event Notification을 Step function과 연결](https://docs.aws.amazon.com/solutions/latest/constructs/aws-s3-stepfunctions.html)할 수 있습니다. \n\n이것은 S3 - EventBridge - Step Function로 구성할 수 있습니다. S3 - Lambda - Step Function으로도 구성할 수 있지만, EventBridge를 사용하면 더 flexible하고 cost effective하고 lower latency를 가집니다. \n\n\n\u003cimg src=\"https://user-images.githubusercontent.com/52392004/210667048-28e036ba-6822-4b4c-8f0a-356986602c6f.png\" width=\"600\"\u003e\n                                                                                                                            \n이를 CDK로는 아래와 같이 구성합니다.                                                                                                                            \n                                                                                                                       \n```java                                                                                                                            \nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { S3ToStepfunctions, S3ToStepfunctionsProps } from '@aws-solutions-constructs/aws-s3-stepfunctions';\nimport * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';\n\nconst startState = new stepfunctions.Pass(this, 'StartState');\n\nnew S3ToStepfunctions(this, 'test-s3-stepfunctions-stack', {\n    stateMachineProps: {\n      definition: startState\n    }\n});\n``` \n\n                                                                                                                            \n## Summary\n\n\n### States\n\n- [Task](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-task-state.html): Execute work. This represents an operation to execute, it's integrable directly with a Lambda Invoke, or you can specify parameters that call a specific AWS service\n\n- [Choice](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-choice-state.html): Add branching logic. It is possible to configure a condition that permits the user to change execution flow based on the output of the previous state\n\n- [Wait](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-wait-state.html): Add a timed delay. It's possible to suspend the machine execution for a specific time\n  \n- [Parallel](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-parallel-state.html):  Execute branches in parallel. This permits the execution of a state set that will be executed in parallel, using a single input value.\n\n- [Map](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-map-state.html): Process each of an input array's items with a state machine. This permits the execution of a state set, using an array of input for each state.\n\n- [Success](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-succeed-state.html): Signal a successful execution and stop. When a machine execution finishes with success\n\n- [Fail](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-fail-state.html): Signal a failed execution and stop. When a machine execution finishes with some errors\n\n- [Pass](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-pass-state.html): Pass input to output. This state passes its input to its output, without performing work. Pass states are useful when constructing and debugging state machines.\n\n### Integration syntax\n\n```c\narn:aws:states:::aws-sdk:serviceName:apiAction.[serviceIntegrationPattern]\n```\n\n예제는 아래와 같습니다. \n\n```c\narn:aws:sates:::aws-sdk:ec2:describeInstances\n```\n\n### Express Workflow\n\n[Express Workflow](https://github.com/kyopark2014/aws-step-functions/blob/main/express.md)에서는 express로 workflow 구성하는것에 대해 설명합니다. \n\n\n### Synchronous\n\n[Execute synchronous task](https://catalog.workshops.aws/stepfunctions/en-US/module-3/step-4)와 같이 Resouce arn에 \".sync\"를 붙여서, synchronous task를 생성 할 수 있습니다.\n\n![image](https://user-images.githubusercontent.com/52392004/174425179-1e6f12b5-207e-41f1-b74e-56c5e5322fdd.png)\n\n### Workshop\n\n[The AWS Step Functions Workshop](https://catalog.workshops.aws/stepfunctions/en-US/)을 이용해 Workshop을 해볼수 있습니다. \n\n### Amazon States Language (ASL)\n\n[Step Function에서는 ASL](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html)을 이용하여 workflow를 생성합니다. \n\n\n\n## References\n\n[aws-stepfunctions-examples](https://github.com/aws-samples/aws-stepfunctions-examples)\n\n[AWS Step Functions을 통한 마이크로서비스 오케스트레이션 - 강세용:: AWS 현대적 애플리케이션 개발](https://www.youtube.com/watch?v=sRXvADi4hmw)\n\n[Step Function with AWS CDK in action: our points of view about it using Typescript](https://www.proud2becloud.com/step-function-with-aws-cdk-in-action-our-points-of-view-about-it-using-typescript/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyopark2014%2Faws-step-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyopark2014%2Faws-step-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyopark2014%2Faws-step-functions/lists"}