How to setup maintenance page in AWS without modifying Cloudfront?










2















We will be deploying changes in our production environment and would like to put up a maintenance page during the deployment. No redirection to error page but simply display the maintenance page when they hit our website. Our current production setup is, DNS->cloudfront->S3 object (mydomain.test.com). Our staging is, DNS->R53->Cloudfront->S3 (mydomain.staging.test.com->mydomain.staging.test53.com). I would like to test this first in our Staging env so that if it works, I will have the DNS entry of our prod env modified and pointed to a new R53 I will create.



What I've done so far is, create an S3 bucket that has the maintenance.html object, created a Cloudfront and R53 solely for the maintenance page. Added the S3 object as the default root object in the CF and mydomain.staging.maintenance.test53.com as alias. Also added the CF as the cname in the R53. So when I load the r53 mydomain.staging.maintenance.test53.com I see the maintenance page.



However, for this to work I have to update the CF of our live environment to remove mydomain.staging.test.com and mydomain.staging.test53.com and add mydomain.staging.maintenance.test53.com as alias then update the staging live R53 to point to the maintenace R53. This works but the CF changes takes time to propagate.



Would appreciate any suggestions!










share|improve this question






















  • If propagation time is the main concern, you can use Invalidation to clear the old cache -- this can still take a few minutes, though, to reach all the edge servers.

    – brennan
    Nov 21 '18 at 14:04












  • Tried another way to set this up. I built a reverse proxy with an S3 endpoint. Because you can set the ttl in R53 to 60 seconds, it took about a minute or two to put up and take down our maintenance page during our prod release.

    – user10655043
    Nov 22 '18 at 23:47















2















We will be deploying changes in our production environment and would like to put up a maintenance page during the deployment. No redirection to error page but simply display the maintenance page when they hit our website. Our current production setup is, DNS->cloudfront->S3 object (mydomain.test.com). Our staging is, DNS->R53->Cloudfront->S3 (mydomain.staging.test.com->mydomain.staging.test53.com). I would like to test this first in our Staging env so that if it works, I will have the DNS entry of our prod env modified and pointed to a new R53 I will create.



What I've done so far is, create an S3 bucket that has the maintenance.html object, created a Cloudfront and R53 solely for the maintenance page. Added the S3 object as the default root object in the CF and mydomain.staging.maintenance.test53.com as alias. Also added the CF as the cname in the R53. So when I load the r53 mydomain.staging.maintenance.test53.com I see the maintenance page.



However, for this to work I have to update the CF of our live environment to remove mydomain.staging.test.com and mydomain.staging.test53.com and add mydomain.staging.maintenance.test53.com as alias then update the staging live R53 to point to the maintenace R53. This works but the CF changes takes time to propagate.



Would appreciate any suggestions!










share|improve this question






















  • If propagation time is the main concern, you can use Invalidation to clear the old cache -- this can still take a few minutes, though, to reach all the edge servers.

    – brennan
    Nov 21 '18 at 14:04












  • Tried another way to set this up. I built a reverse proxy with an S3 endpoint. Because you can set the ttl in R53 to 60 seconds, it took about a minute or two to put up and take down our maintenance page during our prod release.

    – user10655043
    Nov 22 '18 at 23:47













2












2








2








We will be deploying changes in our production environment and would like to put up a maintenance page during the deployment. No redirection to error page but simply display the maintenance page when they hit our website. Our current production setup is, DNS->cloudfront->S3 object (mydomain.test.com). Our staging is, DNS->R53->Cloudfront->S3 (mydomain.staging.test.com->mydomain.staging.test53.com). I would like to test this first in our Staging env so that if it works, I will have the DNS entry of our prod env modified and pointed to a new R53 I will create.



What I've done so far is, create an S3 bucket that has the maintenance.html object, created a Cloudfront and R53 solely for the maintenance page. Added the S3 object as the default root object in the CF and mydomain.staging.maintenance.test53.com as alias. Also added the CF as the cname in the R53. So when I load the r53 mydomain.staging.maintenance.test53.com I see the maintenance page.



However, for this to work I have to update the CF of our live environment to remove mydomain.staging.test.com and mydomain.staging.test53.com and add mydomain.staging.maintenance.test53.com as alias then update the staging live R53 to point to the maintenace R53. This works but the CF changes takes time to propagate.



Would appreciate any suggestions!










share|improve this question














We will be deploying changes in our production environment and would like to put up a maintenance page during the deployment. No redirection to error page but simply display the maintenance page when they hit our website. Our current production setup is, DNS->cloudfront->S3 object (mydomain.test.com). Our staging is, DNS->R53->Cloudfront->S3 (mydomain.staging.test.com->mydomain.staging.test53.com). I would like to test this first in our Staging env so that if it works, I will have the DNS entry of our prod env modified and pointed to a new R53 I will create.



What I've done so far is, create an S3 bucket that has the maintenance.html object, created a Cloudfront and R53 solely for the maintenance page. Added the S3 object as the default root object in the CF and mydomain.staging.maintenance.test53.com as alias. Also added the CF as the cname in the R53. So when I load the r53 mydomain.staging.maintenance.test53.com I see the maintenance page.



However, for this to work I have to update the CF of our live environment to remove mydomain.staging.test.com and mydomain.staging.test53.com and add mydomain.staging.maintenance.test53.com as alias then update the staging live R53 to point to the maintenace R53. This works but the CF changes takes time to propagate.



Would appreciate any suggestions!







amazon-web-services amazon-s3 amazon-ec2






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 2:06









user10655043user10655043

111




111












  • If propagation time is the main concern, you can use Invalidation to clear the old cache -- this can still take a few minutes, though, to reach all the edge servers.

    – brennan
    Nov 21 '18 at 14:04












  • Tried another way to set this up. I built a reverse proxy with an S3 endpoint. Because you can set the ttl in R53 to 60 seconds, it took about a minute or two to put up and take down our maintenance page during our prod release.

    – user10655043
    Nov 22 '18 at 23:47

















  • If propagation time is the main concern, you can use Invalidation to clear the old cache -- this can still take a few minutes, though, to reach all the edge servers.

    – brennan
    Nov 21 '18 at 14:04












  • Tried another way to set this up. I built a reverse proxy with an S3 endpoint. Because you can set the ttl in R53 to 60 seconds, it took about a minute or two to put up and take down our maintenance page during our prod release.

    – user10655043
    Nov 22 '18 at 23:47
















If propagation time is the main concern, you can use Invalidation to clear the old cache -- this can still take a few minutes, though, to reach all the edge servers.

– brennan
Nov 21 '18 at 14:04






If propagation time is the main concern, you can use Invalidation to clear the old cache -- this can still take a few minutes, though, to reach all the edge servers.

– brennan
Nov 21 '18 at 14:04














Tried another way to set this up. I built a reverse proxy with an S3 endpoint. Because you can set the ttl in R53 to 60 seconds, it took about a minute or two to put up and take down our maintenance page during our prod release.

– user10655043
Nov 22 '18 at 23:47





Tried another way to set this up. I built a reverse proxy with an S3 endpoint. Because you can set the ttl in R53 to 60 seconds, it took about a minute or two to put up and take down our maintenance page during our prod release.

– user10655043
Nov 22 '18 at 23:47












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311407%2fhow-to-setup-maintenance-page-in-aws-without-modifying-cloudfront%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311407%2fhow-to-setup-maintenance-page-in-aws-without-modifying-cloudfront%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

政党

天津地下鉄3号線