Minor Changes
-
6cf7b0c: Enforce a configurable request body size limit in
HTTPReceiverandExpressReceiverto prevent unauthenticated large-body denial-of-service attempts. Both receivers previously buffered the entire request body into memory before signature verification, so a flood of large invalid requests could exhaust memory and crash a publicly exposed app.Both receivers now reject request bodies larger than a new
bodyLimitoption with an HTTP413response before the whole body is buffered. The limit is enforced on the bytes actually received (not theContent-Lengthheader, which a client controls) and applies even whensignatureVerificationisfalse. It defaults to4194304(4 MB); pass a differentnumberof bytes, abytes-style string like'4mb', orInfinityto disable it (not recommended in production).This is a security fix with a minor behavioral change: requests with bodies larger than 4 MB are now rejected with
413by default (previously unbounded). Apps that legitimately receive larger payloads can raisebodyLimiton the receiver.
Patch Changes
- b9acd4f: Fix
AwsEventV1.multiValueQueryStringParametersto allownull, matching the actual AWS API Gateway payload and the@types/aws-lambdaAPIGatewayProxyEventtype. This resolves the type error when passing anAPIGatewayProxyEventdirectly to the handler returned byAwsLambdaReceiver.