PutRecords
Source:
src/AWS/Kinesis/PutRecords.ts
Runtime binding for kinesis:PutRecords.
Bind this operation to a Stream to write up to 500 records per call —
the stream name is injected automatically and kinesis:PutRecords is
granted on the stream. Provide the implementation with
Effect.provide(AWS.Kinesis.PutRecordsHttp). For unbounded batching with
automatic partial-failure retry, use AWS.Kinesis.StreamSink instead.
Writing Batches
Section titled “Writing Batches”// init — bind the operation to the streamconst putRecords = yield* AWS.Kinesis.PutRecords(stream);
// runtime — write a batch from a handlerconst result = yield* putRecords({ Records: orders.map((order) => ({ PartitionKey: order.id, Data: new TextEncoder().encode(JSON.stringify(order)), })),});// result.FailedRecordCount > 0 means some entries need re-submission