{"id":19208607,"url":"https://github.com/heiwa4126/sam-stepfunctions-apigw","last_synced_at":"2025-10-26T09:04:11.022Z","repository":{"id":111911446,"uuid":"477999166","full_name":"heiwa4126/sam-stepfunctions-apigw","owner":"heiwa4126","description":"API Gateway経由でStep Functionsを起動するサンプル","archived":false,"fork":false,"pushed_at":"2022-04-05T07:00:33.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T16:18:45.990Z","etag":null,"topics":["aws-sam","example","stepfunctions"],"latest_commit_sha":null,"homepage":"","language":"Python","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/heiwa4126.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-05T06:16:46.000Z","updated_at":"2022-04-05T06:23:12.000Z","dependencies_parsed_at":"2023-04-18T14:31:23.786Z","dependency_job_id":null,"html_url":"https://github.com/heiwa4126/sam-stepfunctions-apigw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiwa4126%2Fsam-stepfunctions-apigw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiwa4126%2Fsam-stepfunctions-apigw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiwa4126%2Fsam-stepfunctions-apigw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiwa4126%2Fsam-stepfunctions-apigw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heiwa4126","download_url":"https://codeload.github.com/heiwa4126/sam-stepfunctions-apigw/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240280984,"owners_count":19776418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-sam","example","stepfunctions"],"created_at":"2024-11-09T13:27:10.768Z","updated_at":"2025-10-26T09:04:05.985Z","avatar_url":"https://github.com/heiwa4126.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sam-stepfunctions-apigw\n\nAPI Gateway経由でStep Functionsを起動するサンプル。\n\n# 概要\n\nペイロードつけて/runを呼ぶと\nStep Functionsのstart-executionが実行されて\nexecutionArnが返ってくる。\n\nStep Functionsはわざとlambda実行後10秒待つように書いてある。\n\nexecutionArnを引数に/resultを時々呼ぶと\nlambdaでdescribe-executionが実行されてて、\n結果がSUCCEEDEDなら答えが得られる。\n\nこれは簡易的なもの。\n\n1000個程度のトランザクションはStep Functionsに保持されるらしい。\nそれ以上残したい場合はDynamoDBに入れる(TODO)\n\n\n# デプロイ\n\n```sh\nsam build\nsam deploy --guided  # --guidedは最初の1回\n```\n\n`sam deploy --guided` は\n\n```\nXXXFunction may not have authorization defined, Is this okay? [y/N]: y\n```\n\n以外はデフォルトでいいです。\n\nデプロイが終わったら\n```sh\n./export1.sh  # 実行にはjqとyqとaws cliが必要\n```\n\nで、APIのURLを `.export.sh` に書き出してください。\n\n\n# テストの実行\n\n```sh\n./run_test.sh     # Step Functionの起動\n./result_test.sh  # 起動して10秒以内に呼ぶと\"RUNNING\"になる\nsleep 10\n./result_test.sh  # Step Functionの結果の取得\n```\n\n\n# スタックの削除\n\n```sh\nsam delete --no-prompts\n```\nで消えます。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheiwa4126%2Fsam-stepfunctions-apigw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheiwa4126%2Fsam-stepfunctions-apigw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheiwa4126%2Fsam-stepfunctions-apigw/lists"}