Skip to content

Hosting a maintenance page on s3

0

I have an app running on ecs.

Currently setup is domain -> alb -> ecs with the domain records in route53. I have a wildcard ssl from another provider imported into aws cert manager.

I am looking to basically host a very simple maintenance page in s3, then update the route53 entry to point to the s3 maintenance page. Is this possible with a custom domain name - I want the redirect to be invisible to the end user and the url still to show app.mydomain.com.

Is there a guide for achieving this?

asked 2 years ago1.3K views
3 Answers
0

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

EXPERT
answered 2 years ago
AWS
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
0

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.

Enter image description here

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

EXPERT
answered 2 years ago
0

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.

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.