example/put_records.js
async function run() {
  // Read the records
  const records = await BB.all(process.argv.slice(2).map(f => readAsync(f)))
  // Write them to Kinesis
  return BB.map(records, record => kinesis.putRecord({
    Data: JSON.stringify(yaml.safeLoad(record)),
    PartitionKey: '0',
    StreamName: process.env.LAMBDA_KINESIS_STREAM_NAME
  }).promise())
}
async function run() {
  // Read the records
  const records = await BB.all(process.argv.slice(2).map(f => readAsync(f)))
  // Write them to Kinesis
  return BB.map(records, record => kinesis.putRecord({
    Data: JSON.stringify(yaml.safeLoad(record)),
    PartitionKey: '0',
    StreamName: process.env.LAMBDA_KINESIS_STREAM_NAME
  }).promise())
}
async function run ( ) { // Read the records const records = await BB . all ( process . argv . slice ( 2 ) . map ( f => readAsync ( f ) ) ) // Write them to Kinesis return BB . map ( records , record => kinesis . putRecord ( { Data : JSON . stringify ( yaml . safeLoad ( record ) ) , PartitionKey : '0' , StreamName : process . env . LAMBDA_KINESIS_STREAM_NAME } ) . promise ( ) ) }
Load the record
Load the record