I tried AWS Step Functions through the Console

Hi, this is Charu from Classmethod. In this hands-on blog, I will guide you through the process of creating and managing Step Functions using the AWS Management Console. AWS Step Functions is a powerful service that allows you to build serverless workflows to use multiple AWS services together.

Let's get started!

Access a Step Function

  • Navigate to the AWS Management Console (https://aws.amazon.com/console/) and login.
  • Once you are logged in, type "Step Functions" in the AWS services search bar. Click on it to access the Step Functions console.
  • Create State Machine

  • In the Step Functions console, click on the "Create state machine" button.
  • You will find an already created 'Hello World' definition for you. Let's understand it part by part.
  • Comment(optional): A comment providing a brief description of the state machine's purpose.

    StartAt(Required): A string that must exactly match (is case sensitive) the name of one of the state objects. In this case the state machine will start at the state labeled "Pass."

    States: This is the main section where you define each state and its properties.

    Pass: This is a state named "Pass" that passes its input to its output without performing any work. It is used for constructing and debugging state machines.

    Hello World example?: This is a Choice state that adds branching logic to the state machine. It checks the value of the variable $.IsHelloWorldExample, which is expected to be a boolean (true or false). Depending on its value, it will transition to either the "Yes" or "No" state. It has 'Pass' state, 'Fail' state and 'Wait 2 sec' under it.

    Parallel State: This is a Parallel state that creates parallel branches of execution. It will simultaneously execute the "Hello" and "World" states.

    Hello World: This is the final state of the state machine. It is a Pass state that ends the state machine.

  • Give your state machine a unique name and optional description. You can make the additional settings according to your needs.
  • Execution

  • After the creation, in the "Input" section, you can provide any input data that your state machine might require.
  • Click on the "Start execution" button to initiate the execution of the state machine.
  • You can view the execution in the graphical form as shown below-
  • You can click on an individual execution to view its details and see the input/output data for each state.
  • If you want to modify your state machine, go back to the state machine detail page.
  • Click on the "Edit" button to make changes to the state machine definition.
  • You can add more states, create parallel branches, implement error handling, and much more using the Step Functions language.
  • Delete a State Machine

  • If you want to delete your state machine, go back to the state machine detail page.
  • Click on the "Delete" button and confirm the action.
  • In this blog, we learned that Step Functions can help us coordinate and automate tasks seamlessly, allowing us to create efficient serverless applications.

    Thank you for reading till the end!

    Happy Learning :)