mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 01:43:02 -05:00
PutRecords enforced only the per-record limit. AWS also caps a request at 500 records and 10 MiB including partition keys; both are now whole-request rejections with InvalidArgumentException, since per-record ErrorCode only carries throughput and internal failures. The count cap is checked upfront and the byte cap as the loop goes, so neither an over-long batch nor an oversized one is fully decoded before it is rejected. Undecodable or non-string Data counts toward the cap at the UTF-8 bytes the caller sent, so a batch of malformed records cannot slip past it. The per-record maximum becomes per-stream state defaulting to 1024 KiB, set by CreateStream's MaxRecordSizeInKiB or UpdateMaxRecordSize (1024-10240) and reported by DescribeStreamSummary. UpdateMaxRecordSize documents ValidationException for an out-of-range size. CreateStream doesn't, and reserves ValidationException for the on-demand case, so it answers InvalidArgumentException. Streams persisted before the field existed deserialize to the default.