StepFunctions の定義についてのエラー対処

0

下記のような入力があったとします。

{
  "DescribeSnapshots": {
    "ExecutedVersion": "$LATEST",
    "Payload": "{\"all_snapshots_completed\": true, \"snapshot_statuses\": {\"snap-12345\": \"pending\", \"snap-67890\": \"pending\"}}",
    "StatusCode": 200
  }
}

Choice で all_snapshots_completed が true だったら StepA に、 all_snapshots_completed が それ以外だったら StepB に というようにしたいのですが、

An error occurred while executing the state 'Choice' (entered at the event id #35). Invalid path '$.DescribeSnapshots.Payload.all_snapshots_completed': The choice state's condition path references an invalid value.

となってしまいます。

Choice の定義は以下のとおです。

{
  "Type": "Choice",
  "Choices": [
    {
      "Variable": "$.DescribeSnapshots.Payload.all_snapshots_completed",
      "BooleanEquals": true,
      "Next": "StepA"
    }
  ],
  "Default": "StepB"
}

Variable はどのように記述するのが正しいのでしょうか?

naomaro
gefragt vor 8 Monaten196 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen