title: Amazon Step Function with a Lambda that takes trigger from Kinesis
body: <p>So I am trying to create a simple pipeline in Amazon AWS. I want to execute a step function using data generated by a stream which triggers the first lambda of the state machine</p>
  
  <p>What I want to do is following.</p>
  
  <p>Input data is streamed by AWS Kinesis</p>
  
  <p>This Kinesis stream is used as a trigger for a lambda1 that executes and writes to S3 Bucket.</p>
  
  <p>This would trigger (using step function) a lambda2 that would read the content from the given bucket and write it to another bucket</p>
  
  <p>Now I want to implement a state machine using Amazon Step Function. I have created the state machine which is quite straightforward </p>
  
  <pre><code>  {
    "Comment": "Linear step function test",
    "StartAt": "lambda1",
    "States": {
      "lambda1": {
        "Type": "Task",
        "Resource": "arn:....",
        "Next": "lambda2"
      },
      "lambda2": {
        "Type": "Task",
        "Resource": "arn:...",
         "End": true
          }  
      }
  }
  </code></pre>
  
  <p>What I want is, that Kinesis should trigger the first Lambda and once its executed the step function would execute lambda 2. Which does not seem to happen. Step function does nothing even though my Lambda 1 is triggered from the stream and writing to S3 bucket. I have an option to manually start a new execution and pass a JSON as input, but that is not the work flow I am looking for</p>