I have found some links on 502 Bad gateway issues. Check if they apply to your case and see if they help. Please ignore if your case is different
what is your architecture? does it involve Application Load Balancers? if yes, do you have access logs enabled at ALB as well as have application logs to look at as to why the instances are sending HTTP 502? Here are the common things to look at for tshooting HTTP 502 with ALB.
when it comes to AWS Premium Support Plans, having at least Business Support will gave you the options to initiate a live contact (chat or call). and having the right severity of the support case can speed up the process of having an engineer work on it.
 Troubleshoot your Application Load Balancers - HTTP 502: Bad gateway - https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-troubleshooting.html#http-502-issues
502 Bad Gatewayasked 8 months ago
502 Bad Gatewayasked 9 months ago
EC2's load balancer suddenly shows 502 Bad Gateway errorsasked 2 years ago
502 Bad Gateway Nginx Errorasked 9 months ago
Internal Server Error/502 Bad Gateway testing a Lambda Function via the Function URLasked 5 months ago
getting 502 bad gateway errors every time I turn on ec2 instanceasked 4 months ago
Getting 502 Bad Gateway for vitalticks.in web sitaeasked 3 months ago
Getting 502 Bad Gateway Error while accessing the end point from EBSasked 7 months ago
502 Bad Gateway on EC2asked 2 months ago
ongoing 502 (Bad Gateway) errorasked a month ago