You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: AlbModel rejects events when the target group has multi-value headers enabled #8847
When a Lambda target group has multi-value headers turned on, ALB sends multiValueHeaders and multiValueQueryStringParameters instead of headers and queryStringParameters (ALB docs). AlbModel should parse those events and keep the multi-value fields.
Current Behaviour
AlbModel requires headers and queryStringParameters and doesn't have the multi-value fields, so every event from a target group with that setting fails with a ValidationError. The two multi-value ALB events in the repo, tests/events/albMultiValueHeadersEvent.json and tests/events/albMultiValueQueryStringEvent.json, both fail to parse.
The ALBEvent data class and ALBResolver already work with both shapes, and the TypeScript AlbSchema accepts both too.
pydantic_core._pydantic_core.ValidationError: 2 validation errors for AlbModel
headers
Field required [type=missing, input_value={'requestContext': {'elb'...isBase64Encoded': False}, input_type=dict]
queryStringParameters
Field required [type=missing, input_value={'requestContext': {'elb'...isBase64Encoded': False}, input_type=dict]
Possible Solution
Add multiValueHeaders and multiValueQueryStringParameters to AlbModel, and give all four header and query string fields an empty dict as the default. That's what ALBEvent returns for the fields ALB leaves out, and headers keeps its dict[str, str] type, so existing handlers don't need a None check. With that change the snippet prints {'parameter1': ['value1', 'value2'], 'parameter2': ['value']}.
Steps to Reproduce
Run the snippet above from the repo root. albMultiValueHeadersEvent.json fails the same way.
Activity