-
-
Notifications
You must be signed in to change notification settings - Fork 374
Open
Labels
Description
An app responding with a large amount/length of headers can cause the "request line and header values" to exceed 1MB:
https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
1 MB for the total combined size of request line and header values
That is a bit ambiguous, but I guess and header values must mean the request and response headers?
When this happens, it is very hard to diagnose what is happening. You'll end up with the normal START, REPORT END logs in Cloudwatch, but no errors.
The response looks like this:
HTTP/1.1 502 Bad Gateway
Connection: keep-alive
Content-Length: 122
Content-Type: text/html
Date: Wed, 20 Aug 2025 13:03:25 GMT
Server: awselb/2.0
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
It would be nice if Bref detected this and threw an invocation exception, like it does for oversized body payloads (6mb).