Tutorial 1: Create the prototype for your state machine - Amazon Step Functions
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Tutorial 1: Create the prototype for your state machine

In this tutorial, you create the prototype for your credit card processing workflow using Step Functions’ Workflow Studio. You’ll choose the required API actions and states from the Actions and Flow tabs respectively, and use the drag and drop feature of Workflow Studio to create the workflow prototype. In the subsequent tutorials, you’ll learn how to configure the Amazon Web Services and the Step Functions’ states you’ll be using in this workflow.

To create the state machine prototype
  1. Open the Step Functions console and choose Create state machine.

  2. In the Choose a template dialog box, select Blank.

  3. Choose Select. This opens Workflow Studio in Design mode.

  4. In Workflow Studio, from the Actions tab, drag an Amazon Lambda Invoke API action and drop it to the empty state labelled Drag first state here. Configure it as follows:

    1. In the Configuration tab, for State name, enter Get credit limit.

  5. From the Flow tab, drag and drop a Choice state below the Get credit limit state. Rename the Choice state to Credit applied >= 5000?.

  6. Drag and drop the following states as branches of the Credit applied >= 5000? state.

    1. Amazon SNS Publish – From the Actions tab, drag and drop the Amazon SNS Publish API action. Rename this state to Wait for human approval.

    2. Pass state — From the Flow tab, drag and drop the Pass state. Rename this branch to Auto-approve limit.

  7. Drag and drop a Pass state below the Wait for human approval state. Rename this Pass state to Credit limit approved.

  8. Drag and drop a Parallel state after the Choice state as follows:

    1. Drop the Parallel state after the Credit limit approved state.

    2. Rename the Parallel state to Verify applicant's identity and address.

    3. Under both the branches of the Parallel state, drag and drop two Amazon Lambda Invoke API actions.

    4. Rename these states as Verify identity and Verify address respectively.

    5. Choose the Auto-approve limit state and for Next state, select Verify applicant's identity and address.

  9. Drag a DynamoDB Scan state and drop it below the Verify applicant's identity and address state. Rename the DynamoDB Scan state to Get list of credit bureaus.

  10. Drag and drop a Map state after the Get list of credit bureaus state. Configure the Map state as follows:

    1. Rename it to Get scores from all credit bureaus.

    2. For Processing mode, keep the default selection of Inline.

    3. Drag and drop an Amazon Lambda Invoke API action to the empty state labelled Drop state here.

    4. Rename the Amazon Lambda Invoke state to Get all scores.

  11. Keep this window open and proceed to the next tutorial for further actions.

Next steps

In the next tutorial, you learn how to integrate the Lambda function used by the Get credit limit state.