title: Unit testing AWS: step function
body: <p>I am beginner in AWS and i have created my first AWS step function given below, Now next step is to unit test this step function. I independently unit tested my lambda function now i got stuck and have no idea about, how can i proceed for unit testing of step function.</p>
  
  <p>I also get a question in my mind is it worth doing unit testing of step function,some time feel can it be done or not since it is just a json.</p>
  
  <p>I tried to search but i didn't got any clue on internet or AWS documentation 
  Any help will be appreciated any blog on this or any sample use case 
  Thanks </p>
  
  <pre><code>{
  "Comment": "An example of the Amazon States Language using a choice state.",
  "StartAt": "LoginState",
  States": {
  "LoginState": {
    "Type": "Task",
    "Resource": "arn:aws:lambda:us-east-1:170344690019:function:myfirstLogin",
    "Next": "ChoiceState"
  },
  "ChoiceState": {
    "Type" : "Choice",
    "Choices": [
      {
        "Variable": "$.success",
        "BooleanEquals": true,
        "Next": "logoutState"
      },
      {
        "Variable": "$.success",
        "BooleanEquals": false,
        "Next": "DefaultState"
      }
    ],
    "Default": "DefaultState"
  },
  
  "logoutState": {
    "Type" : "Task",
    "Resource": "arn:aws:lambda:us-east-1:170344690019:function:myFirstLogout",
    "End": true
  },
  
  
  "DefaultState": {
    "Type": "Fail",
    "Error": "DefaultStateError",
    "Cause": "No Matches!"
  }
  
  }
  }
  </code></pre>