Step Functionsにバージョンとエイリアス機能が追加されました!

Step Functionsにバージョンとエイリアス機能が追加されました!
この記事をシェアする

こんにちは。スカイアーチHRソリューションズのきむです。

先日、Step Functionsにバージョンとエイリアス機能が追加されました。

待ち望んだアップデートです。

それではさっそく機能を確認していきましょう。

ステートマシン定義ファイル

今回は3つの定義ファイルを使ってステートマシンを作成します。

それぞれ”Hello World”とバージョン番号を含んだメッセージを出力するステートマシンとなっています。

{
    "StartAt": "HelloWorld",
    "States": {
        "HelloWorld": {
            "Type": "Pass",
            "End": true,
            "Result": {
                "statusCode": 200,
                "body": "Hellow World v1"
            }
        }
    }
}
{
    "StartAt": "HelloWorld",
    "States": {
        "HelloWorld": {
            "Type": "Pass",
            "End": true,
            "Result": {
                "statusCode": 200,
                "body": "Hellow World v2"
            }
        }
    }
}
{
    "StartAt": "HelloWorld",
    "States": {
        "HelloWorld": {
            "Type": "Pass",
            "End": true,
            "Result": {
                "statusCode": 200,
                "body": "Hellow World Latest"
            }
        }
    }
}

バージョンの作成

本記事ではaws cliでステートマシンの作成や実行を行っていきます。

利用するバージョンはaws-cli/2.12.3です。

これ以前のバージョンの場合はStep Functionsのバージョンとエイリアス関連のコマンドを利用できないので注意してください。

以下の流れで作成していきます。

  1. 「helloworld_v1.asl.json」でステートマシンを作成
  2. 作成されたステートマシンからバージョン1を作成
  3. 「helloworld_v2.asl.json」でステートマシンを更新
  4. 更新されたステートマシンからバージョン2を作成
  5. 「helloworld_latest.asl.json」でステートマシンを更新

それでは作っていきましょう。

$ aws stepfunctions  create-state-machine \
--name HelloWorld \
--definition file://helloworld_v1.asl.json \
--role-arn arn:aws:iam::xxxxxxxxxxxx:role/StepFunctionsRole

creationDate: '2023-06-24T19:09:56.821000+09:00'
stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld

作成されたステートマシンの内容を確認します。

$ aws stepfunctions describe-state-machine \
--state-machine-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld

creationDate: "2023-06-24T19:09:56.821000+09:00"
definition:
  "{\n    \"StartAt\": \"HelloWorld\",\n    \"States\": {\n        \"HelloWorld\":
  {\n            \"Type\": \"Pass\",\n            \"End\": true,\n            \"Result\":
  {\n                \"statusCode\": 200,\n                \"body\": \"Hellow World
  v1\"\n            }\n        }\n    }\n}"
loggingConfiguration:
  includeExecutionData: false
  level: OFF
name: HelloWorld
roleArn: arn:aws:iam::xxxxxxxxxxxx:role/StepFunctionsRole
stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
status: ACTIVE
tracingConfiguration:
  enabled: false
type: STANDARD

続いてaws stepfunctions publish-state-machine-versionコマンドを使ってバージョンを作成します。

$ aws stepfunctions  publish-state-machine-version \
--state-machine-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld

creationDate: '2023-06-24T19:10:55.922000+09:00'
stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1

ステートマシンのARNにバージョン情報のサフィックスが付与さる形式となりました。

バージョンのARNを指定して、ステートマシンの内容を確認します。

$ aws stepfunctions describe-state-machine \
--state-machine-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1

creationDate: '2023-06-24T19:10:55.922000+09:00'
definition: "{\n    \"StartAt\": \"HelloWorld\",\n    \"States\": {\n        \"HelloWorld\":
  {\n            \"Type\": \"Pass\",\n            \"End\": true,\n            \"Result\":
  {\n                \"statusCode\": 200,\n                \"body\": \"Hellow World
  v1\"\n            }\n        }\n    }\n}"
loggingConfiguration:
  includeExecutionData: false
  level: OFF
name: HelloWorld
roleArn: arn:aws:iam::xxxxxxxxxxxx:role/StepFunctionsRole
stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1
status: ACTIVE
tracingConfiguration:
  enabled: false
type: STANDARD

次は「helloworld_v2.asl.json」の内容でステートマシンの更新+バージョン2の作成と確認を行います

$ aws stepfunctions update-state-machine \
--state-machine-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld \
--definition file://helloworld_v2.asl.json 

revisionId: 5513a64b-df56-42a6-b7e3-ed05c6b00c43
updateDate: '2023-06-24T19:11:28.547000+09:00'

$ aws stepfunctions  publish-state-machine-version \
--state-machine-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld

creationDate: '2023-06-24T19:11:49.918000+09:00'
stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2

$ aws stepfunctions describe-state-machine \
--state-machine-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2

creationDate: '2023-06-24T19:11:49.918000+09:00'
definition: "{\n    \"StartAt\": \"HelloWorld\",\n    \"States\": {\n        \"HelloWorld\":
  {\n            \"Type\": \"Pass\",\n            \"End\": true,\n            \"Result\":
  {\n                \"statusCode\": 200,\n                \"body\": \"Hellow World
  v2\"\n            }\n        }\n    }\n}"
loggingConfiguration:
  includeExecutionData: false
  level: OFF
name: HelloWorld
revisionId: 5513a64b-df56-42a6-b7e3-ed05c6b00c43
roleArn: arn:aws:iam::xxxxxxxxxxxx:role/StepFunctionsRole
stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2
status: ACTIVE
tracingConfiguration:
  enabled: false
type: STANDARD

最後に「helloworld_latest.asl.json」でステートマシンを更新と確認をします。

$ aws stepfunctions update-state-machine \
--state-machine-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld \
--definition file://helloworld_origin.asl.json 

revisionId: e43c5544-c3a7-41d8-8870-73ec92785594
updateDate: '2023-06-24T19:13:24.332000+09:00'

$ aws stepfunctions describe-state-machine \
--state-machine-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld

creationDate: '2023-06-24T19:09:56.821000+09:00'
definition: "{\n    \"StartAt\": \"HelloWorld\",\n    \"States\": {\n        \"HelloWorld\":
  {\n            \"Type\": \"Pass\",\n            \"End\": true,\n            \"Result\":
  {\n                \"statusCode\": 200,\n                \"body\": \"Hellow World
  Latest\"\n            }\n        }\n    }\n}"
loggingConfiguration:
  includeExecutionData: false
  level: OFF
name: HelloWorld
revisionId: e43c5544-c3a7-41d8-8870-73ec92785594
roleArn: arn:aws:iam::xxxxxxxxxxxx:role/StepFunctionsRole
stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
status: ACTIVE
tracingConfiguration:
  enabled: false
type: STANDARD

これで準備が整いました。

ステートマシンの実行

まずはステートマシンを通常実行します。

$ aws stepfunctions start-execution \
--name HelloWorld-`date +%Y%m%d-%H%M%S` \
--state-machine arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230624-191427
startDate: '2023-06-24T19:14:25.492000+09:00'

aws stepfunctions get-execution-historyコマンドで実行履歴を確認します。

–execution-arnにはaws stepfunctions start-executionコマンドの実行で出力されたexecutionArnを指定します。

$ aws stepfunctions get-execution-history \
--execution-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230624-191427

events:
- executionStartedEventDetails:
    input: '{}'
    inputDetails:
      truncated: false
    roleArn: arn:aws:iam::xxxxxxxxxxxx:role/StepFunctionsRole
  id: 1
  previousEventId: 0
  timestamp: '2023-06-24T19:14:25.492000+09:00'
  type: ExecutionStarted
- id: 2
  previousEventId: 0
  stateEnteredEventDetails:
    input: '{}'
    inputDetails:
      truncated: false
    name: HelloWorld
  timestamp: '2023-06-24T19:14:25.525000+09:00'
  type: PassStateEntered
- id: 3
  previousEventId: 2
  stateExitedEventDetails:
    name: HelloWorld
    output: '{"statusCode":200,"body":"Hellow World Latest"}'
    outputDetails:
      truncated: false
  timestamp: '2023-06-24T19:14:25.525000+09:00'
  type: PassStateExited
- executionSucceededEventDetails:
    output: '{"statusCode":200,"body":"Hellow World Latest"}'
    outputDetails:
      truncated: false
  id: 4
  previousEventId: 3
  timestamp: '2023-06-24T19:14:25.570000+09:00'
  type: ExecutionSucceeded

続いてそれぞれのバージョンを実行していきます。

$ aws stepfunctions start-execution \
--name HelloWorld-`date +%Y%m%d-%H%M%S` \
--state-machine arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230624-191513
startDate: '2023-06-24T19:15:11.510000+09:00'

$ aws stepfunctions start-execution \
--name HelloWorld-`date +%Y%m%d-%H%M%S` \
--state-machine arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230624-191534
startDate: '2023-06-24T19:15:33.074000+09:00'

$ aws stepfunctions get-execution-history \
--execution-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230624-191427

実行結果を確認します。

  • バージョン1
$ aws stepfunctions get-execution-history \
--execution-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230624-191513

events:
- executionStartedEventDetails:
    input: '{}'
    inputDetails:
      truncated: false
    roleArn: arn:aws:iam::xxxxxxxxxxxx:role/StepFunctionsRole
    stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1
  id: 1
  previousEventId: 0
  timestamp: '2023-06-24T19:15:11.510000+09:00'
  type: ExecutionStarted
- id: 2
  previousEventId: 0
  stateEnteredEventDetails:
    input: '{}'
    inputDetails:
      truncated: false
    name: HelloWorld
  timestamp: '2023-06-24T19:15:11.587000+09:00'
  type: PassStateEntered
- id: 3
  previousEventId: 2
  stateExitedEventDetails:
    name: HelloWorld
    output: '{"statusCode":200,"body":"Hellow World v1"}'
    outputDetails:
      truncated: false
  timestamp: '2023-06-24T19:15:11.587000+09:00'
  type: PassStateExited
- executionSucceededEventDetails:
    output: '{"statusCode":200,"body":"Hellow World v1"}'
    outputDetails:
      truncated: false
  id: 4
  previousEventId: 3
  timestamp: '2023-06-24T19:15:11.625000+09:00'
  type: ExecutionSucceeded

バージョン2

$ aws stepfunctions get-execution-history \
--execution-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230624-191427

events:
- executionStartedEventDetails:
    input: '{}'
    inputDetails:
      truncated: false
    roleArn: arn:aws:iam::xxxxxxxxxxxx:role/StepFunctionsRole
    stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2
  id: 1
  previousEventId: 0
  timestamp: '2023-06-24T19:15:33.074000+09:00'
  type: ExecutionStarted
- id: 2
  previousEventId: 0
  stateEnteredEventDetails:
    input: '{}'
    inputDetails:
      truncated: false
    name: HelloWorld
  timestamp: '2023-06-24T19:15:33.108000+09:00'
  type: PassStateEntered
- id: 3
  previousEventId: 2
  stateExitedEventDetails:
    name: HelloWorld
    output: '{"statusCode":200,"body":"Hellow World v2"}'
    outputDetails:
      truncated: false
  timestamp: '2023-06-24T19:15:33.108000+09:00'
  type: PassStateExited
- executionSucceededEventDetails:
    output: '{"statusCode":200,"body":"Hellow World v2"}'
    outputDetails:
      truncated: false
  id: 4
  previousEventId: 3
  timestamp: '2023-06-24T19:15:33.148000+09:00'
  type: ExecutionSucceeded

通常実行時には最新版の内容が反映され、バージョン指定の実行時にはそれぞれのバージョンの内容が反映されていますね。

エイリアスの作成と実行

エイリアスの作成にはaws stepfunctions create-state-machine-aliasコマンドを使用します。

1バージョンに対して1つのエイリアスを作成することができるのですが、Step Functionsでは最大で2つのバージョンを指定しそれぞれのバージョンで重みづけが可能です。

今回は1つのエイリアスで両バージョンを指定し

それぞれ50%の重みづけで作成します。

$ aws stepfunctions create-state-machine-alias \
--name HelloWorldAlias \
--routing-configuration stateMachineVersionArn=arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1,weight=50 \
stateMachineVersionArn=arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2,weight=50

creationDate: '2023-06-25T02:12:39.002000+09:00'
stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias

ステートマシンのARNにエイリアス名のサフィックスが付与さる形式となりました。

作成されたエイリアスはaws stepfunctions describe-state-machine-aliasコマンドで確認できます。

$ aws stepfunctions describe-state-machine-alias \
--state-machine-alias-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias

creationDate: '2023-06-25T02:12:39.002000+09:00'
name: HelloWorldAlias
routingConfiguration:
- stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1
  weight: 50
- stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2
  weight: 50
stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias

それでは実行していきます。以下のスクリプトでエイリアス付きのステートマシンを10回実行します。

#!/bin/bash
for i in `seq 1 10`
do
    aws stepfunctions start-execution \
    --name HelloWorld-`date +%Y%m%d-%H%M%S` \
    --state-machine arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
done
$ ./execution.sh 
executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022118
startDate: '2023-06-25T02:21:18.373000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022119
startDate: '2023-06-25T02:21:19.498000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022120
startDate: '2023-06-25T02:21:20.550000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022121
startDate: '2023-06-25T02:21:21.606000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022122
startDate: '2023-06-25T02:21:22.722000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022123
startDate: '2023-06-25T02:21:23.767000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022124
startDate: '2023-06-25T02:21:24.831000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022125
startDate: '2023-06-25T02:21:25.894000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022126
startDate: '2023-06-25T02:21:26.970000+09:00'

executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022127
startDate: '2023-06-25T02:21:28.048000+09:00'

中身を全て見るのは大変なのでここでは各実行がどのバージョンで実行されたかをaws stepfunctions list-executionsコマンドで確認します。

$ aws stepfunctions list-executions \
--state-machine-alias-arn arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias

executions:
- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022127
  name: HelloWorld-20230625-022127
  startDate: '2023-06-25T02:21:28.048000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:28.124000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022126
  name: HelloWorld-20230625-022126
  startDate: '2023-06-25T02:21:26.970000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:27.049000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022125
  name: HelloWorld-20230625-022125
  startDate: '2023-06-25T02:21:25.894000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:25.943000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022124
  name: HelloWorld-20230625-022124
  startDate: '2023-06-25T02:21:24.831000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:24.902000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022123
  name: HelloWorld-20230625-022123
  startDate: '2023-06-25T02:21:23.767000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:23.838000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022122
  name: HelloWorld-20230625-022122
  startDate: '2023-06-25T02:21:22.722000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:22.787000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022121
  name: HelloWorld-20230625-022121
  startDate: '2023-06-25T02:21:21.606000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:21.672000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022120
  name: HelloWorld-20230625-022120
  startDate: '2023-06-25T02:21:20.550000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:20.612000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022119
  name: HelloWorld-20230625-022119
  startDate: '2023-06-25T02:21:19.498000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:1
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:19.576000+09:00'

- executionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:execution:HelloWorld:HelloWorld-20230625-022118
  name: HelloWorld-20230625-022118
  startDate: '2023-06-25T02:21:18.373000+09:00'
  stateMachineAliasArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:HelloWorldAlias
  stateMachineArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld
  stateMachineVersionArn: arn:aws:states:ap-northeast-1:xxxxxxxxxxxx:stateMachine:HelloWorld:2
  status: SUCCEEDED
  stopDate: '2023-06-25T02:21:18.451000+09:00'

それぞれ5回ずつ実行された結果となりました。

おわりに

お疲れさまでした。

ありそうでなかった機能がようやくStep Functionsにも実装されました。

これにより複数のバージョン管理やBlue/Green、Canaryデプロイなどが容易に行えるようになったのは嬉しいですね。

この記事が少しでも皆様のご参考になれば幸いです。

この記事をシェアする
著者:きむ
フェスが好きなエンジニア