0

I have an ECS cluster with a handful of containers. My build pipeline is set to automatically pick up new changes when they are pushed to ECR. This works great, and while the new task is deploying new containers, all my load balancers - which normally point to these containers - serve up a 502 Bad Gateway error. I know this is technically correct, but is there a way I can intercept this specific case and display "app is updating" so I might differentiate between real 502 errors caused by some mysterious bug and ones I caused intentionally with the deploy process?

ecoant
  • 1

1 Answers1

0

Sadly, you can't do this at the ALB level. But, you could create a CloudFront (CF) distro in front of it. The CF would allow you to customize error messages, intercept them, even redirect to temporary website through lambda@edge.

The other option is to use Route53 DNS failover, but this gives you less flexibility then CF.

Marcin
  • 215,873
  • 14
  • 235
  • 294