https://github.com/heiwa4126/sam-stepfunctions-parallel
AWS Step Functions の parallel と map のサンプル
https://github.com/heiwa4126/sam-stepfunctions-parallel
aws-sam example stepfunctions
Last synced: 6 months ago
JSON representation
AWS Step Functions の parallel と map のサンプル
- Host: GitHub
- URL: https://github.com/heiwa4126/sam-stepfunctions-parallel
- Owner: heiwa4126
- Created: 2022-04-06T01:20:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-06T01:36:18.000Z (almost 4 years ago)
- Last Synced: 2025-02-23T07:16:31.716Z (11 months ago)
- Topics: aws-sam, example, stepfunctions
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sam-stepfunctions-parallel
AWS Step Functions の parallel と map のサンプル。
## 参考
- [AWS Step FunctionsのParallelステートを使って並列実行させる | DevelopersIO](https://dev.classmethod.jp/articles/aws-step-functions-parallel-execution/)
# デプロイ
```sh
sam build
sam deploy --guided # --guidedは最初の1回
```
`sam deploy --guided` は
デフォルトでいいです。
デプロイが終わったら
```sh
pip3 install -U --user -r requirements.txt
./export1.py
```
と、実行すると、Step FunctionsのARNなどが
- `.export.yml`
- `.export.sh`
に書き出されます。
# テストの実行
```sh
./start_statemachine.sh # Step Functionの起動
./get_statemachine_status.sh # Step Functionの結果の取得
sleep 10 # ASLでわざと10秒待つように作ってある
./get_statemachine_status.sh # Step Functionの結果の取得
```
# スタックの削除
```sh
sam delete --no-prompts
```
で消えます。