Be able to serve a static page custom page on timeout
AWS ALB's can be used as a frontend load balancer for lambda,
BUT they have a drawbacks which is that they don't have the possibility to customize 502 error page
As Bref has a little extra window , would it make sense to be able to configure it to return its own "timeout" response, so that users don't see a blank page with just written "502" ?
Oh, that's an interesting idea, but then we would loose the invocation being reported as an error:
https://github.com/brefphp/bref/blob/bdf833131d035d77d473d89b8c901688916fc2d8/src/Event/Http/FpmHandler.php#L147-L151
With API Gateway we can customize the responses to achieve that, but yeah, with ALB you seem to be out of luck :/ I'm not sure we want to an such an option just for ALB, especially since that option goes against the Lambda behavior (mark the invocation as failed via an error = no response).
hmmm maybe I need to reconsider why I choose ALB instead of API Gateway
https://dashbird.io/blog/aws-api-gateway-vs-application-load-balancer/
I may have mistakenly think "ALB is less capable than API Gateway, so it will be less expensive"
A little late here, but you could put a CloudFront distribution in front of your ALB and add a custom error page for 502/504 statuses to that origin.