title: Loop inside a Step Function
body: <p>I am trying to call a couple of steps in my step function in a loop but I am unable to get my head around how I need to do this. Here's what I have till now: I need to add another lambda function(GetReviews) which will then call CreateReview, SendNotification in a loop. How would I go about doing this? 
  I am referring to the "<a href="https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-create-iterate-pattern-section.html" rel="noreferrer">Iterating a Loop Using Lambda</a>" document, which shows it is possible. </p>
  
  <p><strong>Step function Defination:</strong></p>
  
  <pre><code>{
    "Comment": "Scheduling Engine",
    "StartAt": "CreateReview",
    "States": {
      "CreateReview": {
        "Type": "Task",
        "Resource": "arn:aws:lambda:us-west-2:529627678433:function:CreateReview",
        "Next": "CreateNotification",
        "InputPath": "$",
        "ResultPath": "$.CreateReviewResult",
        "OutputPath": "$"      
      },
      "CreateNotification": {
        "Type": "Task",
        "Resource": "arn:aws:lambda:us-west-2:529627678433:function:CreateNotification",
        "InputPath": "$",
        "ResultPath": "$.CreateNotificationResult",
        "OutputPath": "$",
        "End": true
      }
    }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/nNIxv.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/nNIxv.jpg" alt="enter image description here"></a></p>