In this example, we will demonstrate how to create an AWS Step Function with Lambda functions in LocalStack.
- LocalStack
- Docker
awslocalCLI
Start LocalStack via:
localstack start -dRun the following command to create the Lambda functions:
make create-lambdasCreate the Step Function:
awslocal stepfunctions create-state-machine --name step-demo \
--definition "$(cat step-definition.json)" \
--role-arn arn:aws:iam::000000000000:role/step-function-lambdaStart the execution:
awslocal stepfunctions start-execution \
--state-machine-arn arn:aws:states:us-east-1:000000000000:stateMachine:step-demo \
--input '{"adam": "LocalStack", "cole": "Stack"}'This creates and invokes the flow between the three Lambda functions we created using LocalStack earlier.