title: How to stream AWS Lambda response in node?
body: <p>I have an AWS Lambda function, and I need to invoke it from my node app and stream the result back to the client.  I've looked in <a href="http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html#invoke-property" rel="noreferrer">the docs</a> but can't see a way.  I want to do something like this:</p>
  
  <pre><code>lambda.invoke(params).then(data =&gt; data.pipe(res))
  </code></pre>
  
  <p>or even </p>
  
  <pre><code>lambda.invoke(params, (err, data) =&gt; {
    // data should be a pipeable stream instead of buffered
    data.pipe(res)
  })
  </code></pre>