1

we have an AWS infrastructure as follows

Client --> Internet Facing LoadBalancer --> Firewall --> Internal LoadBalancer--> ECS Containers

we have an LAMBDA FUNCTION, which stops the servers during night time and starts again at Morning time to reduce billing .

during the instances are in stopped state, if any one access the docker containers, obviously they will face "503 service unavailable"

now the task I need to perform is:

Is there any elagant way to show any personalized text or image like(ex: showing servers are in stopped state please visit again at Morning time) rather than this ugly 503 unavailable.

How can I approch to achieve the above scenario ? what services in AWS can I make use?

Any Ideas or procedures are highly appreciated.

Thanks in Advance, Cheers :)

Bala krishna
  • 519
  • 1
  • 10
  • 24

1 Answers1

0

If you can add CloudFront in front of your application then you have the option to specify custom error pages. By following this method it will retrospectively kick in from the moment that you start serving 503 errors.

If you are unable to use CloudFront, then assuming you are using an Application Load Balancer somewhere in your stack you could update one of your listeners to instead return a fixed response during this time. This would require you to automate the rollout everytime which would be a disadvantage.

Chris Williams
  • 32,215
  • 4
  • 30
  • 68