- Newest
- Most votes
- Most comments
Hello.
How about setting up a static website with CloudFront and S3 for your maintenance pages?
In this case, you should be able to use any domain you want, such as "app.mydomain.com".
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html
I think you can also use an S3 static site, but this requires the bucket name to be the same as the domain and can only be accessed via HTTP.
That's why I recommend website hosting using CloudFront.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteEndpoints.html
Hi,
Even tough it has a different purpose (routing for internal site), the solution of this post is indeed very close to what you what to achieve as it shows how to include S3 bucket into the ALB directly.
So, if you apply this solution, when you stop the ECS containers, they will become unhealthy and your trafic will be router to the s3 static page.
Best,
Diuduer
What we do is have the CloudFront in front of an S3 bucket and on the ALB create a rule at which sends a custom response with a HTML Body of an iframe and the source iFRAME is the cloudfront Distro.
This way DNS doesnt need updating and is instance. No need to worry about dns updates and the browsers trying to connect to the ALB even though the IP has changed.

By the way, if the maintenance page is not that elaborate, it is also possible to deliver a static page using ALB's fixed response. https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#fixed-response-actions https://medium.com/@minaxijoshi3101/how-to-apply-a-maintenance-page-for-your-application-on-the-public-alb-layer-when-your-application-d6a0bb6d2a22