I have an AWS lambda that's hooked up to (triggered by) an AWS Kinesis Stream. When I fire events into Kinesis, my lambda gets called. Here's some example code that pushes events into Kinesis (this part works):
var kinesis = new AWS.Kinesis({
region: 'us-east-1'
});
var params = {
Data: new Buffer(JSON.stringify(data)),
StreamName: 'myStreamName',
PartitionKey: uuid.v1()
};
kinesis.putRecord(params, function(err, data) {
done();
});
When I successfully put a record, I get a response like this:
{ ShardId: 'shardId-000000000000',
SequenceNumber: '49570419697469019326213778569044054238145932258132885506' }
How can I use the SequenceNumber to look up the RequestId of the lambda being triggered?