A CLI tool to execute AWS Step Functions locally using just a single command.
invoke
- To invoke the step function locally
[Options]
--asl-file PATH
Path to the step function ASL file which contains the state-machine definition.
required
--port, -p INTEGER
Port on which the step function server would be running.
default: 8083
--input-file, -i PATH
Path to the JSON file containing input to the step function.
--config-file, -i PATH
Path to the JSON file containing the configuration options for step function.
Currently only supports LAMBDA_PORT
which represents the port on which lambda server is running locally.
$ sfnx invoke \
-p 8083 \
--asl-file "path/to/asl-file" \
--input-file "path/to/input-file" \
--config-file "path/to/config-file"
# Basic (contains just a simple state-machine)
$ sfnx invoke --asl-file "./example/basic/state-machine.asl.json"
# With Lambda (The state-machine uses lambda as one of the steps)
# Provided the lambda server is running locally in another shell
$ sfnx invoke --asl-file "./example/with-lambda/state-machine.asl.json" --config-file "./example/with-lambda/config.json"
# install the dependencies
$ npm i
# build the project
$ npm run build
# execute commands
$ npx sfnx -v
$ npx sfnx invoke --asl-file "path/to/asl-file"