AWS Step Functions
Basic example of AWS Step Functions in Python
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set aws-py-stepfunctionscd pulumi-examples/aws-py-stepfunctionsA basic example that demonstrates using AWS Step Functions with a Lambda function, written in Python.
Prerequisites#
Deploying the example#
-
Create a new stack:
Terminal window pulumi stack init stepfunctions-dev -
Set the AWS region to deploy into:
Terminal window pulumi config set aws:region us-east-2 -
Install dependencies:
Terminal window python3 -m venv venvsource venv/bin/activatepip install -r requirements.txt -
Deploy the stack:
Terminal window pulumi up -
Start an execution using the AWS CLI (or from the console at https://console.aws.amazon.com/states):
Terminal window aws stepfunctions start-execution --state-machine-arn $(pulumi stack output state_machine_arn)
Cleaning up#
Once you’re finished experimenting, destroy your stack and remove it to avoid incurring any additional cost:
pulumi destroypulumi stack rm