Menu
AWS Step Functions
Developer Guide

Getting Started

This tutorial introduces you to the basics of working with AWS Step Functions. In this tutorial you'll create a simple, independently-running state machine using a Pass state. The Pass state is the simplest state which represents a no-op (an instruction with no operation).

Step 1: Creating the State Machine

Step Functions offers various predefined state machines in the form of blueprints. Create your first state machine using the Hello World blueprint.

To create the state machine

  1. Log in to the Step Functions console and choose Get Started.

  2. On the Create a state machine page, choose the Hello world blueprint.

    Step Functions fills in the name of the state machine automatically and populates the Code pane with the Amazon States Language description of the state machine.

    {
      "Comment": "A Hello World example of the Amazon States Language using a Pass state",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Pass",
          "Result": "Hello World!",
          "End": true
        }
      }
    }

    This JSON text defines a single Pass state named HelloWorld. For more information, see State Machine Structure.

  3. Verify that the Visual Workflow pane displays the following graph of your state machine structure. Use the graph to check that your Amazon States Language code describes the state machine correctly.

    If you don't see the graph, choose 
       refresh
    in the Visual Workflow pane.

  4. Choose Create State Machine.

    The IAM role for your state machine executions dialog box is displayed. Step Functions creates and selects an IAM role automatically.

    Note

    If you delete the IAM role that Step Functions creates, Step Functions can't recreate it later. Similarly, if you modify the role (for example, by removing Step Functions from the principals in the IAM policy), Step Functions can't restore its original settings later. For more information about creating an IAM role manually, see Creating IAM Roles for Use with AWS Step Functions.

  5. Choose OK.

    The state machine is created and an acknowledgement page is displayed.

Step 2: Starting a new execution

After you create your state machine, you can start an execution.

To start a new execution

  1. On the Helloworld page, choose New execution.

    The New execution page is displayed.

  2. (Optional) To help identify your execution, you can enter an ID for it. To specify the ID, use the Enter your execution id here text box. If you don't enter an ID, Step Functions generates a unique ID automatically.

  3. Choose Start Execution.

    A new execution of your state machine starts, and a new page showing your running execution is displayed.

  4. In the Execution Details section, choose the Info tab to view the Execution Status and the Started and Closed timestamps.

  5. To view the results of your execution, choose the Output tab.

Next Steps

Now that you've created a simple state machine using a Pass state, you might want to try the following: