I want to show AWS a custom error page instead of 502 Bad Gateway when we have an issue with the APP, so far there are 2 solution I found:
-
Using a failover records with primary and secondary record to an S3 static website I don’t see this as a practical solution as the DNS would be cached and even if the app is working again the user would still see the maintenance page unless he re-open his browser or something
-
Use CloudFront distribution in front of the endpoint: I see this as a better solution but we still can’t use it as currently it’s not possible t add CloudFront as we still have a lot oh HTTP request that takes more than 60 second and not sure if AWS could increase the limit to much higer than that like 30 min
So I am looking if there is a third solution that could include using lamda or maybe the laod balancer settings and rules or something
Thanks