title: DynamoDB to Kinesis Stream
body: <p>I have an application that writes to a DynamoDB table, and I'm trying to get Kinesis to do my aggregation then write the aggregated data to another DynamoDB table.</p>
  
  <p>Streams are enabled on my DynamoDB table, and I have a Lamdba trigger on the stream as follows:</p>
  
  <pre class="lang-js prettyprint-override"><code>'use strict';
  
  var AWS = require('aws-sdk');
  var kinesis = new AWS.Kinesis();
  
  exports.handler = (event, context, callback) =&gt; {
      event.Records.forEach((record) =&gt; {
  
          var myValue = record.dynamodb.NewImage.myValue.N;
          var partitionKey = record.key.S;
          var data = '{"VALUE":"' + myValue + '"}';
  
          var recordParams = {
              Data: data,
              PartitionKey: partitionKey,
              StreamName: 'MyStreamName'
          };
  
          console.log('Try Put to Kinesis Stream');
  
          kinesis.putRecord(recordParams, function(err, data) {
              if (err) {
                  console.log('Failed Put');
              } else {
                  console.log('Successful Put');
              }
          });
      });
  };
  </code></pre>
  
  <p>This writes successfully to my Kinesis Stream when I have three or four elements in the Lambda test event.</p>
  
  <p>When I enable my trigger it does not write to my Kinesis Stream at all. There appears to be about 100 elements coming in at a time. In Cloudwatch I see the 'Try Put to Kinesis Stream' message, but I don't even see the Success/Failure messages.</p>
  
  <p>Am I doing something completely wrong or there a better approach to this problem?</p>
  
  <p>If DynamoDB's stream could feed straight into Kinesis Analytics that would be my first prize :)</p>