InvalidPayloadLength using Kinesis Enhanced Fan-Out consumer #3350
Labels
bug
This issue is a confirmed bug.
closing-soon
kinesis
p2
This is a standard priority issue
response-requested
Waiting on additional info and feedback.
Describe the bug
Code location
We're processing a Kinesis stream using an Enhanced Fan-Out consumer, and see the above error raised by Botocore. This error is being raised because the payload sent by Kinesis is greater than a hard-coded
_MAX_PAYLOAD_LENGTH
at 16Mb. There is no recovery from this, as the stream will continue to attempt to send the same event that exceeds the payload max length on retry.Regression Issue
Expected Behavior
I would expect that the
_MAX_PAYLOAD_LENGTH
value be configured to match the limits of Kinesis when processing as an Enhanced Fan-Out consumer. If Kinesis doesn't have an inherent limit, then this value should be easily configurable or recoverable by clients.Current Behavior
Reproduction Steps
This isn't very useful as reproduction depends on external state in Kinesis
Possible Solution
No response
Additional Information/Context
Worked around the issue with the following snippet, which is far from ideal for production code:
SDK version used
1.35.77
Environment details (OS name and version, etc.)
AWS ECS container running image based off python:3.12.7-slim on AWS EC2 Linux/X86_64 (al2023-ami-ecs-hvm-2023.0.20240610-kernel-6.1-x86_64)
The text was updated successfully, but these errors were encountered: