---
title: "AWS Step Functions"
description: "Basic example of AWS Step Functions"
url: "https://www.pulumi.com/dev/examples/aws-ts-stepfunctions/"
image: "https://www.pulumi.com/assets/og/dev/examples/aws-ts-stepfunctions.png"
---

# AWS Step Functions

Basic example of AWS Step Functions

- Source on GitHub: https://github.com/pulumi/examples/tree/master/aws-ts-stepfunctions
- Deploy with Pulumi: https://app.pulumi.com/new?template=https%3A%2F%2Fgithub.com%2Fpulumi%2Fexamples%2Ftree%2Fmaster%2Faws-ts-stepfunctions

## Get started with this example

This example lives in the [pulumi/examples](https://github.com/pulumi/examples/tree/master/aws-ts-stepfunctions) repo. Pull down just this directory to follow along:

```bash
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examples
git -C pulumi-examples sparse-checkout set aws-ts-stepfunctions
cd pulumi-examples/aws-ts-stepfunctions
```

A basic example that demonstrates using AWS Step Functions with a Lambda function.

This example also utilizes our [Stack Readme](https://www.pulumi.com/docs/intro/pulumi-cloud/projects-and-stacks/#stack-readme) feature. You can view the stack readme by going to the console by running `pulumi console` and selecting the README tab. See the [`stack-readme-ts`](https://github.com/pulumi/examples/tree/master/stack-readme-ts) example for a more detailed example.

```
# Create and configure a new stack
$ pulumi stack init stepfunctions-dev
$ pulumi config set aws:region us-east-2

# Install dependencies
$ npm install

# Preview and run the deployment
$ pulumi up

# Start execution using the AWS CLI (or from the console at https://console.aws.amazon.com/states)
$ aws stepfunctions start-execution --state-machine-arn $(pulumi stack output stateMachineArn)

# Remove the app
$ pulumi destroy
```
