0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【備忘録】StepFunctionのパラメーターの渡し方について

Posted at

StepFunctionのパラメーターの渡し方

StepFunctionでLambdaを使用したステートマシンを作成した際に、Lambdaの出力とステートの出力をどのように次のステートに渡すのか忘れないように整理。

InputPath

ステートへの入力をフィルタリングする。
Lambdaへの入力をフィルタリングしたい場合に使用する。

OutputPath

ステートへの出力をフィルタリングする。
ステートの出力をフィルタリングしたい場合に使用する。

Parameters

Lambdaへ渡したい入力を記載する。
ステートからの入力は捨てられる。

ResultPath

Lambdaの出力をどのような名前でステートの出力へ渡すか。
以下例

入力

"ResultPath": "$.lambda_output"

出力

{
"test1": 2,
"test2": 1,
"lambda_output": {
"statusCode": 200,
"body": "ファイルの処理とアップロードに成功しました。"
}
}

以下の場合はLambda関数の出力だけがステートの出力になる。

"ResultPath": "$"

以下の場合はLambdaの出力を捨ててステートの入力がステートの出力になる。

"ResultPath": null

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?