Skip to content

A CLI tool to execute AWS Step Functions locally

License

Notifications You must be signed in to change notification settings

RajKotadia/sfnx

Repository files navigation

sfnx - Step Function Executor

A CLI tool to execute AWS Step Functions locally using just a single command.

Commands

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"

Example

# 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"

To run locally

# 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"

About

A CLI tool to execute AWS Step Functions locally

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published