Files
floci/docs
Ovidiu (Ovi) 33e12b3cf7 fix(lambda): persist ParallelizationFactor on stream event source mappings (#7299)
* fix(lambda): persist ParallelizationFactor on stream event source mappings

CreateEventSourceMapping and UpdateEventSourceMapping dropped ParallelizationFactor, and
the responses never returned it. A Terraform aws_lambda_event_source_mapping with
parallelization_factor set therefore showed a change on every plan.

The field is now validated (an integer from 1 to 10, Kinesis and DynamoDB Streams sources
only), stored, and returned on every stream mapping, 1 when none was set, as AWS does.
SQS mappings still omit it. The pollers still process one batch per shard at a time; the
docs say so.

* fix(lambda): keep ParallelizationFactor on a null update and reject values beyond long

An UpdateEventSourceMapping with "ParallelizationFactor": null cleared the stored factor,
so a mapping set to 10 read back as 1. A JSON null is an absent member, as
FunctionResponseTypes already treats it, and now leaves the factor unchanged.

The range check ran after narrowing to long, so 18446744073709551617 wrapped to 1 and was
accepted. The value is now range-checked before it is narrowed.

* fix(lambda): share one range check across the event source mapping integers

MaximumBatchingWindowInSeconds, MaximumRetryAttempts, MaximumRecordAgeInSeconds,
ScalingConfig.MaximumConcurrency and ParallelizationFactor each repeated the same numeric,
whole-number and range check. One boundedInteger helper now serves all five, with the
error messages unchanged. It checks the range before narrowing, so a value beyond long
such as 18446744073709551617 no longer wraps to 1 and passes in the other four.
2026-11-02 09:36:25 -04:00
..
2026-03-15 17:43:56 -05:00