Support Documents
×


Creating a workflow using different States with AWS Step Functions

Lab Details

  1. This lab walks you through the steps to create a step function and work with different states.

  2. You will practice using AWS Step Functions.

  3. Duration: 1 hour

  4. AWS Region: US East (N. Virginia).

Introduction

AWS Step Functions

  1. AWS Step Functions is a serverless function orchestrator that makes it easy to sequence AWS Lambda functions and multiple AWS services into business-critical applications.

  2. You can create and run a series of checkpointed and event-driven workflows that maintain the application state with the help of visual interface.

  3. The output of one step acts as an input to the next. Each step in your application executes in order, as defined by your business logic.

  4. Orchestrating a series of individual serverless applications, managing retries, and debugging failures can be challenging.

  5. Step Functions manages sequencing, error handling, retry logic, and state, removing a significant operational burden from you.

States

  1. A workflow in step functions is called State Machines.

  2. The various tasks which are performed inside the workflow are called States.

  3. There are different types of States.

    • Task State: A Task state is used to perform some work inside the workflow.

    • Choice State: A Choice state takes decisions according to the output in the workflow.

    • Wait State: A Wait state delays a particular task in the workflow for some time.

    • Parallel State: A Parallel state executes 2 or more tasks parallely.

    • Pass State: A Pass state passes it’s input to its output without performing work.

    • Succeed State: A Succeed state stops an execution successfully.

    • Fail State: A Fail state stops the execution of the state machine and marks it as a failure.

Tasks Details:

  1. Log into the AWS Management Console.

  2. Create IAM roles for lambda execution and step functions.

  3. Create 5 Lambda Functions.

  4. Create a state machine in step function.

  5. Use different States in the workflow like Task, Choice, Parallel, Wait, End states.

  6. Test the step function.

  7. Validation of the lab.

Architecture Diagram